1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 07:12:28 +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
{
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");
return this.getCurrentDirectory();
return null;
}
[cwd, oldcwd] = [newdir, cwd];
}