1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 19:14:11 +01:00

Normailze path in 'set cwd' rather than in File.joinPaths. Fixes issue #11.

This commit is contained in:
Kris Maglione
2010-09-23 06:54:00 -04:00
parent ed38a05313
commit 408b97e3e9
2 changed files with 1 additions and 2 deletions

View File

@@ -105,6 +105,7 @@ const IO = Module("io", {
else {
let dir = io.File(newDir);
dactyl.assert(dir.exists() && dir.isDirectory(), "E344: Can't find directory " + dir.path.quote());
dir.normalize();
[this._cwd, this._oldcwd] = [dir.path, this.cwd];
}
return this.cwd;

View File

@@ -547,8 +547,6 @@ const File = Class("File", {
try {
// FIXME: should only expand env vars and normalise path separators
path.appendRelativePath(this.expandPath(tail, true));
if (path.exists())
path.normalize();
}
catch (e) {
return { exists: function () false, __noSuchMethod__: function () { throw e; } };