From 1d9004c99c93d52adc446a3fe6cc6b770a7775b3 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 20 Nov 2007 01:12:50 +0000 Subject: [PATCH] error message for non-existing :cd dir --- content/io.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/io.js b/content/io.js index 1d705488..2087ea9a 100644 --- a/content/io.js +++ b/content/io.js @@ -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]; }