1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-12 03:55:46 +01:00

error message for non-existing :cd dir

This commit is contained in:
Martin Stubenschrott
2007-11-20 01:12:50 +00:00
parent 678a5657fd
commit 1d9004c99c

View File

@@ -118,10 +118,11 @@ vimperator.IO = function ()//{{{
else else
{ {
newdir = this.expandPath(newdir); newdir = this.expandPath(newdir);
if (!this.getFile(newdir).isDirectory()) var file = this.getFile(newdir);
if (!file.exists() || !file.isDirectory())
{ {
vimperator.echoerr("E344: Can't find directory \"" + newdir + "\" in path"); vimperator.echoerr("E344: Can't find directory \"" + newdir + "\" in path");
return this.getCurrentDirectory(); return null;
} }
[cwd, oldcwd] = [newdir, cwd]; [cwd, oldcwd] = [newdir, cwd];
} }