summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-30 03:27:25 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-30 03:27:25 +0100
commit2c6a597d7767d38fc5c8e743dd57f13733c1287f (patch)
tree81a62b8d43b7f8be8b580bd82605e8cefebbfc8f /AK
parentf10e0d054612eef415ce96a0e2383910d39668c0 (diff)
downloadserenity-2c6a597d7767d38fc5c8e743dd57f13733c1287f.zip
FileManager: Make the tree view follow the directory view navigations.
Diffstat (limited to 'AK')
-rw-r--r--AK/FileSystemPath.cpp1
-rw-r--r--AK/FileSystemPath.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/AK/FileSystemPath.cpp b/AK/FileSystemPath.cpp
index 2a3a556d27..971bbf52bd 100644
--- a/AK/FileSystemPath.cpp
+++ b/AK/FileSystemPath.cpp
@@ -40,6 +40,7 @@ bool FileSystemPath::canonicalize(bool resolve_symbolic_links)
builder.append('/');
builder.append(cpart);
}
+ m_parts = move(canonical_parts);
m_string = builder.to_string();
return true;
}
diff --git a/AK/FileSystemPath.h b/AK/FileSystemPath.h
index d56625dcaf..64827157a7 100644
--- a/AK/FileSystemPath.h
+++ b/AK/FileSystemPath.h
@@ -14,9 +14,12 @@ public:
String basename() const { return m_basename; }
+ const Vector<String>& parts() const { return m_parts; }
+
private:
bool canonicalize(bool resolve_symbolic_links = false);
+ Vector<String> m_parts;
String m_string;
String m_basename;
bool m_is_valid { false };