diff --git a/src/emucore/FSNode.cxx b/src/emucore/FSNode.cxx index 327bbbedb..b06dc77f6 100644 --- a/src/emucore/FSNode.cxx +++ b/src/emucore/FSNode.cxx @@ -38,12 +38,7 @@ FilesystemNode::FilesystemNode(AbstractFilesystemNode *realNode) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FilesystemNode::FilesystemNode(const string& p) { - AbstractFilesystemNode* tmp = 0; - if (p.empty() || p == "." || p == "~") - tmp = AbstractFilesystemNode::makeHomeDirectoryFileNode(); - else - tmp = AbstractFilesystemNode::makeFileNodePath(p); - + AbstractFilesystemNode* tmp = AbstractFilesystemNode::makeFileNodePath(p); _realNode = Common::SharedPtr(tmp); } @@ -78,9 +73,7 @@ bool FilesystemNode::getChildren(FSList& fslist, ListMode mode, bool hidden) con return false; for (AbstractFSList::iterator i = tmp.begin(); i != tmp.end(); ++i) - { fslist.push_back(FilesystemNode(*i)); - } return true; } diff --git a/src/emucore/FSNode.hxx b/src/emucore/FSNode.hxx index 5323aeb7a..cba5badbd 100644 --- a/src/emucore/FSNode.hxx +++ b/src/emucore/FSNode.hxx @@ -116,7 +116,7 @@ class FilesystemNode * Create a new FilesystemNode referring to the specified path. This is * the counterpart to the path() method. * - * If path is empty or equals "." or "~", then a node representing the + * If path is empty or equals '~', then a node representing the * "home directory" will be created. If that is not possible (since e.g. the * operating system doesn't support the concept), some other directory is * used (usually the root directory). @@ -374,15 +374,6 @@ class AbstractFilesystemNode */ virtual AbstractFilesystemNode* getParent() const = 0; - /** - * Returns a node representing the "home directory". - * - * On Unix, this will be the value of $HOME. - * On Windows, it will be the 'My Documents' folder. - * Otherwise, it should just return the same value as getRoot(). - */ - static AbstractFilesystemNode* makeHomeDirectoryFileNode(); - /** * Construct a node based on a path; the path is in the same format as it * would be for calls to fopen(). @@ -395,6 +386,8 @@ class AbstractFilesystemNode */ static AbstractFilesystemNode* makeFileNodePath(const string& path); + // TODO - the following method isn't actually used anywhere in + // the current code (2012-06-14) /** * Returns a special node representing the filesystem root. * The starting point for any file system browsing. diff --git a/src/unix/FSNodePOSIX.cxx b/src/unix/FSNodePOSIX.cxx index 3393210fa..09691917e 100644 --- a/src/unix/FSNodePOSIX.cxx +++ b/src/unix/FSNodePOSIX.cxx @@ -301,12 +301,6 @@ AbstractFilesystemNode* AbstractFilesystemNode::makeRootFileNode() return new POSIXFilesystemNode(); } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AbstractFilesystemNode* AbstractFilesystemNode::makeHomeDirectoryFileNode() -{ - return new POSIXFilesystemNode("~/", true); -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AbstractFilesystemNode* AbstractFilesystemNode::makeFileNodePath(const string& path) { diff --git a/src/win32/FSNodeWin32.cxx b/src/win32/FSNodeWin32.cxx index 0eb57fa1a..e3a8b5554 100644 --- a/src/win32/FSNodeWin32.cxx +++ b/src/win32/FSNodeWin32.cxx @@ -376,12 +376,6 @@ AbstractFilesystemNode* AbstractFilesystemNode::makeRootFileNode() return new WindowsFilesystemNode(); } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AbstractFilesystemNode* AbstractFilesystemNode::makeHomeDirectoryFileNode() -{ - return new WindowsFilesystemNode("~\\"); -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AbstractFilesystemNode* AbstractFilesystemNode::makeFileNodePath(const string& path) {