diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-05-26 14:52:44 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-26 14:35:10 +0200 |
commit | 602c3fdb3a0975418886e32cf9cc53b45d2f8964 (patch) | |
tree | 079b3ebdaf7db517625496e35acf1158adacad77 /Libraries/LibCore/StandardPaths.cpp | |
parent | f746bbda174d914d5de9379084a6fb2095c58d68 (diff) | |
download | serenity-602c3fdb3a0975418886e32cf9cc53b45d2f8964.zip |
AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
Diffstat (limited to 'Libraries/LibCore/StandardPaths.cpp')
-rw-r--r-- | Libraries/LibCore/StandardPaths.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibCore/StandardPaths.cpp b/Libraries/LibCore/StandardPaths.cpp index 6494a1f43c..c73e16461b 100644 --- a/Libraries/LibCore/StandardPaths.cpp +++ b/Libraries/LibCore/StandardPaths.cpp @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/FileSystemPath.h> +#include <AK/LexicalPath.h> #include <AK/String.h> #include <AK/StringBuilder.h> #include <LibCore/StandardPaths.h> @@ -37,12 +37,12 @@ namespace Core { String StandardPaths::home_directory() { if (auto* home_env = getenv("HOME")) - return canonicalized_path(home_env); + return LexicalPath::canonicalized_path(home_env); auto* pwd = getpwuid(getuid()); String path = pwd ? pwd->pw_dir : "/"; endpwent(); - return canonicalized_path(path); + return LexicalPath::canonicalized_path(path); } String StandardPaths::desktop_directory() @@ -50,7 +50,7 @@ String StandardPaths::desktop_directory() StringBuilder builder; builder.append(home_directory()); builder.append("/Desktop"); - return canonicalized_path(builder.to_string()); + return LexicalPath::canonicalized_path(builder.to_string()); } String StandardPaths::downloads_directory() @@ -58,7 +58,7 @@ String StandardPaths::downloads_directory() StringBuilder builder; builder.append(home_directory()); builder.append("/Downloads"); - return canonicalized_path(builder.to_string()); + return LexicalPath::canonicalized_path(builder.to_string()); } String StandardPaths::tempfile_directory() |