aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorMax Horn2006-05-03 11:36:07 +0000
committerMax Horn2006-05-03 11:36:07 +0000
commitfea36d0112ef887b26d9dcbfd8818b511150295a (patch)
tree34faa6947914c4fcb6fb17d080de9692b3fbdd3e /backends/fs
parent5ef5110299a777eb1ccfcc9ed41659b9fc50e3bf (diff)
downloadscummvm-rg350-fea36d0112ef887b26d9dcbfd8818b511150295a.tar.gz
scummvm-rg350-fea36d0112ef887b26d9dcbfd8818b511150295a.tar.bz2
scummvm-rg350-fea36d0112ef887b26d9dcbfd8818b511150295a.zip
Disabled evil getcwd hack in POSIXFilesystemNode
svn-id: r22302
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/posix/posix-fs.cpp12
1 files 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;
}