diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:36:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:36:17 +0000 |
commit | 1bebfb5ae4c240064beffe3232402ea68b110510 (patch) | |
tree | 0d59f9af15c52cd83501cdba2433146f3a378d8e /lib/System/Unix | |
parent | 7dea1019c1dcf2f9198397ca290784db092b75af (diff) | |
download | external_llvm-1bebfb5ae4c240064beffe3232402ea68b110510.zip external_llvm-1bebfb5ae4c240064beffe3232402ea68b110510.tar.gz external_llvm-1bebfb5ae4c240064beffe3232402ea68b110510.tar.bz2 |
Modify setStatusInfoOnDisk to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/Path.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 26f29c0..f26315c 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -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 |