diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/API/SBPlatform.cpp | |
parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) |
Notes
Diffstat (limited to 'source/API/SBPlatform.cpp')
-rw-r--r-- | source/API/SBPlatform.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/API/SBPlatform.cpp b/source/API/SBPlatform.cpp index 5f29f0033988..aedad871cd20 100644 --- a/source/API/SBPlatform.cpp +++ b/source/API/SBPlatform.cpp @@ -244,9 +244,9 @@ bool SBPlatform::SetWorkingDirectory(const char *path) { PlatformSP platform_sp(GetSP()); if (platform_sp) { if (path) - platform_sp->SetWorkingDirectory(FileSpec{path, false}); + platform_sp->SetWorkingDirectory(FileSpec(path)); else - platform_sp->SetWorkingDirectory(FileSpec{}); + platform_sp->SetWorkingDirectory(FileSpec()); return true; } return false; @@ -364,9 +364,9 @@ SBError SBPlatform::Get(SBFileSpec &src, SBFileSpec &dst) { SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) { return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) { if (src.Exists()) { - uint32_t permissions = src.ref().GetPermissions(); + uint32_t permissions = FileSystem::Instance().GetPermissions(src.ref()); if (permissions == 0) { - if (llvm::sys::fs::is_directory(src.ref().GetPath())) + if (FileSystem::Instance().IsDirectory(src.ref())) permissions = eFilePermissionsDirectoryDefault; else permissions = eFilePermissionsFileDefault; @@ -406,7 +406,7 @@ SBError SBPlatform::Run(SBPlatformShellCommand &shell_command) { if (working_dir) shell_command.SetWorkingDirectory(working_dir); } - return platform_sp->RunShellCommand(command, FileSpec{working_dir, false}, + return platform_sp->RunShellCommand(command, FileSpec(working_dir), &shell_command.m_opaque_ptr->m_status, &shell_command.m_opaque_ptr->m_signo, &shell_command.m_opaque_ptr->m_output, @@ -449,7 +449,7 @@ SBError SBPlatform::MakeDirectory(const char *path, uint32_t file_permissions) { PlatformSP platform_sp(GetSP()); if (platform_sp) { sb_error.ref() = - platform_sp->MakeDirectory(FileSpec{path, false}, file_permissions); + platform_sp->MakeDirectory(FileSpec(path), file_permissions); } else { sb_error.SetErrorString("invalid platform"); } @@ -460,7 +460,7 @@ uint32_t SBPlatform::GetFilePermissions(const char *path) { PlatformSP platform_sp(GetSP()); if (platform_sp) { uint32_t file_permissions = 0; - platform_sp->GetFilePermissions(FileSpec{path, false}, file_permissions); + platform_sp->GetFilePermissions(FileSpec(path), file_permissions); return file_permissions; } return 0; @@ -471,8 +471,8 @@ SBError SBPlatform::SetFilePermissions(const char *path, SBError sb_error; PlatformSP platform_sp(GetSP()); if (platform_sp) { - sb_error.ref() = platform_sp->SetFilePermissions(FileSpec{path, false}, - file_permissions); + sb_error.ref() = + platform_sp->SetFilePermissions(FileSpec(path), file_permissions); } else { sb_error.SetErrorString("invalid platform"); } |