mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
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
This commit is contained in:
1 parent
5c13623a69
commit
7d86ee5ab0
42 files changed
+312
-303
No files matched your search
@@ -19,6 +19,8 @@
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Utility/Error.h"
|
||||
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
using namespace lldb;
|
||||
@@ -363,7 +365,7 @@ SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) {
|
||||
if (src.Exists()) {
|
||||
uint32_t permissions = src.ref().GetPermissions();
|
||||
if (permissions == 0) {
|
||||
if (src.ref().GetFileType() == FileSpec::eFileTypeDirectory)
|
||||
if (llvm::sys::fs::is_directory(src.ref().GetPath()))
|
||||
permissions = eFilePermissionsDirectoryDefault;
|
||||
else
|
||||
permissions = eFilePermissionsFileDefault;
|
||||
|
||||
Reference in new issue
Block a user