From 1bebfb5ae4c240064beffe3232402ea68b110510 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 28 Jul 2006 22:36:17 +0000 Subject: Modify setStatusInfoOnDisk to not throw an exception. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29402 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/Unix/Path.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/System/Unix') 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 -- cgit v1.1