From fea36d0112ef887b26d9dcbfd8818b511150295a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 May 2006 11:36:07 +0000 Subject: Disabled evil getcwd hack in POSIXFilesystemNode svn-id: r22302 --- backends/fs/posix/posix-fs.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index ade8a2060f..86ca581fd1 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -83,7 +83,13 @@ AbstractFilesystemNode *AbstractFilesystemNode::getNodeForPath(const String &pat } POSIXFilesystemNode::POSIXFilesystemNode() { -#ifndef __DC__ +/* The Browser code now saves the last browsed directory into the config file. + Hence the need to start at the "current" directory is far less, and we can + remove this hack for now. Still, there may be some need to obtain a ref + to the "current" directory. See the TODO list for some thoughts on this. + + I am leaving this code in here for the time being, to be used as reference. + // FIXME: It is evil & slow to always call getcwd here. // The intention behind this hack was/is to be more user friendly // in our save/load dialogs: Instead of starting at the FS root, @@ -97,10 +103,10 @@ POSIXFilesystemNode::POSIXFilesystemNode() { _path = buf; _displayName = lastPathComponent(_path); _path += '/'; -#else +*/ + // The root dir. _path = "/"; _displayName = _path; -#endif _isValid = true; _isDirectory = true; } -- cgit v1.2.3