aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/morphos/abox-fs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs/morphos/abox-fs.cpp')
-rw-r--r--backends/fs/morphos/abox-fs.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/backends/fs/morphos/abox-fs.cpp b/backends/fs/morphos/abox-fs.cpp
index 712427b8cc..d774fc6974 100644
--- a/backends/fs/morphos/abox-fs.cpp
+++ b/backends/fs/morphos/abox-fs.cpp
@@ -38,7 +38,7 @@ class ABoxFilesystemNode : public AbstractFilesystemNode {
bool _isDirectory;
bool _isValid;
String _path;
-
+
public:
ABoxFilesystemNode();
ABoxFilesystemNode(BPTR lock, CONST_STRPTR display_name = NULL);
@@ -140,7 +140,7 @@ ABoxFilesystemNode::~ABoxFilesystemNode()
FSList ABoxFilesystemNode::listDir(ListMode mode) const
{
FSList myList;
-
+
if (!_isValid)
error("listDir() called on invalid node");
@@ -207,18 +207,15 @@ AbstractFilesystemNode *ABoxFilesystemNode::parent() const
if (!_isDirectory)
error("parent() called on file node");
- if (_lock == NULL)
+ if (_lock == NULL) {
/* Parent of the root is the root itself */
- node = clone();
- else
- {
+ node = 0;
+ } else {
BPTR parent_lock = ParentDir(_lock);
- if (parent_lock)
- {
+ if (parent_lock) {
node = new ABoxFilesystemNode(parent_lock);
UnLock(parent_lock);
- }
- else
+ } else
node = new ABoxFilesystemNode();
}