mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where the file status information is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -281,7 +281,8 @@ recurseDirectories(const sys::Path& path,
|
||||
for (std::set<sys::Path>::iterator I = content.begin(), E = content.end();
|
||||
I != E; ++I) {
|
||||
// Make sure it exists and is a directory
|
||||
const sys::FileStatus *Status = I->getFileStatus(false, ErrMsg);
|
||||
const sys::FileStatus *Status =
|
||||
sys::PathWithStatus(*I).getFileStatus(false, ErrMsg);
|
||||
if (!Status)
|
||||
return true;
|
||||
if (Status->isDir) {
|
||||
@@ -309,7 +310,8 @@ bool buildPaths(bool checkExistence, std::string* ErrMsg) {
|
||||
if (!aPath.exists())
|
||||
throw std::string("File does not exist: ") + Members[i];
|
||||
std::string Err;
|
||||
const sys::FileStatus *si = aPath.getFileStatus(false, &Err);
|
||||
const sys::FileStatus *si =
|
||||
sys::PathWithStatus(aPath).getFileStatus(false, &Err);
|
||||
if (!si)
|
||||
throw Err;
|
||||
if (si->isDir) {
|
||||
@@ -645,7 +647,8 @@ doReplaceOrInsert(std::string* ErrMsg) {
|
||||
|
||||
if (found != remaining.end()) {
|
||||
std::string Err;
|
||||
const sys::FileStatus *si = found->getFileStatus(false, &Err);
|
||||
const sys::FileStatus *si =
|
||||
sys::PathWithStatus(*found).getFileStatus(false, &Err);
|
||||
if (!si)
|
||||
return true;
|
||||
if (si->isDir) {
|
||||
|
Reference in New Issue
Block a user