mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Modify setStatusInfoOnDisk to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -647,15 +647,15 @@ Path::renamePathOnDisk(const Path& newName) {
|
||||
}
|
||||
|
||||
bool
|
||||
Path::setStatusInfoOnDisk(const FileStatus &si) const {
|
||||
Path::setStatusInfoOnDisk(const FileStatus &si, std::string *ErrStr) const {
|
||||
struct utimbuf utb;
|
||||
utb.actime = si.modTime.toPosixTime();
|
||||
utb.modtime = utb.actime;
|
||||
if (0 != ::utime(path.c_str(),&utb))
|
||||
ThrowErrno(path + ": can't set file modification time");
|
||||
return GetErrno(path + ": can't set file modification time", ErrStr);
|
||||
if (0 != ::chmod(path.c_str(),si.mode))
|
||||
ThrowErrno(path + ": can't set mode");
|
||||
return true;
|
||||
return GetErrno(path + ": can't set mode", ErrStr);
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user