diff options
| author | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
| commit | 7d86ee5ab0ca98edff2f07c373967f34227c960e (patch) | |
| tree | 622b630eca7be4ea6b604c8eacc956031dbb8ee9 /lldb/source/Target/ModuleCache.cpp | |
| parent | 5c13623a69baed43b7f0cbf2912a3baa951285e2 (diff) | |
Resubmit FileSystem changes.
This was originall reverted due to some test failures in
ModuleCache and TestCompDirSymlink. These issues have all
been resolved and the code now passes all tests.
Differential Revision: https://reviews.llvm.org/D30698
llvm-svn: 297300
Diffstat (limited to 'lldb/source/Target/ModuleCache.cpp')
| -rw-r--r-- | lldb/source/Target/ModuleCache.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lldb/source/Target/ModuleCache.cpp b/lldb/source/Target/ModuleCache.cpp index d01307c23e8e..c72c9915b659 100644 --- a/lldb/source/Target/ModuleCache.cpp +++ b/lldb/source/Target/ModuleCache.cpp @@ -59,21 +59,16 @@ public: void Delete(); }; -FileSpec JoinPath(const FileSpec &path1, const char *path2) { +static FileSpec JoinPath(const FileSpec &path1, const char *path2) { FileSpec result_spec(path1); result_spec.AppendPathComponent(path2); return result_spec; } -Error MakeDirectory(const FileSpec &dir_path) { - if (dir_path.Exists()) { - if (!dir_path.IsDirectory()) - return Error("Invalid existing path"); +static Error MakeDirectory(const FileSpec &dir_path) { + namespace fs = llvm::sys::fs; - return Error(); - } - - return FileSystem::MakeDirectory(dir_path, eFilePermissionsDirectoryDefault); + return fs::create_directories(dir_path.GetPath(), true, fs::perms::owner_all); } FileSpec GetModuleDirectory(const FileSpec &root_dir_spec, const UUID &uuid) { |
