fix error condition
This commit is contained in:
parent
cb322b4b1a
commit
5723b368db
|
@ -278,7 +278,7 @@ module.exports.assign = function (state, tun, cb) {
|
||||||
|
|
||||||
fs.access(conf.handler, fs.constants.R_OK, function (err1) {
|
fs.access(conf.handler, fs.constants.R_OK, function (err1) {
|
||||||
fs.stat(conf.handler, function (err2, stat) {
|
fs.stat(conf.handler, function (err2, stat) {
|
||||||
if (err1 || err2 && (stat.isFile() || stat.isDirectory())) {
|
if ((err1 || err2) || !(stat.isFile() || stat.isDirectory())) {
|
||||||
errorTcp(conf, cb);
|
errorTcp(conf, cb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
There are a number of conditions and whatnot that must be tested in more-or-less real-world conditions.
|
There are a number of conditions and whatnot that must be tested in more-or-less real-world conditions.
|
||||||
|
|
||||||
telebit init // fresh install
|
telebit init // fresh install
|
||||||
telebit init // after install complete
|
telebit init // after install complete
|
||||||
|
|
||||||
telebit http 3000 // have an app listening on localhost:3000
|
telebit http 3000 // have an app listening on localhost:3000
|
||||||
telebit http 4545 // do not have an app listening
|
telebit http 4545 // do not have an app listening
|
||||||
|
|
||||||
telebit ssh auto // do have ssh listening on localhost:22
|
telebit http ./path/to/site
|
||||||
telebit ssh 4545 // do have ssh listenening
|
telebit http ./path/to/dir
|
||||||
|
telebit http ./path/to/file
|
||||||
|
telebit http ./doesnt/exist
|
||||||
|
|
||||||
telebit tcp 3000 // have an echo server listening on localhost:3000
|
telebit ssh auto // do have ssh listening on localhost:22
|
||||||
telebit tcp 4545 // no server listening
|
telebit ssh 4545 // do have ssh listenening
|
||||||
|
|
||||||
|
telebit tcp 3000 // have an echo server listening on localhost:3000
|
||||||
|
telebit tcp 4545 // no server listening
|
||||||
|
|
||||||
|
telebit tcp ./path/to/file
|
||||||
|
telebit tcp ./path/to/dir
|
||||||
|
|
Loading…
Reference in New Issue