diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
commit | ed79596b758935a3f22bf6803bc082a6bbe10f58 (patch) | |
tree | 885a8a50e68dafb39ec886cb31aa4c549fbeb35e /Utility/Touch.hsc | |
parent | bee420bd2d0cbe16489b061b208083e2b8ba9d0e (diff) |
noop
Diffstat (limited to 'Utility/Touch.hsc')
-rw-r--r-- | Utility/Touch.hsc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Utility/Touch.hsc b/Utility/Touch.hsc index b53eab634..e2dba79ab 100644 --- a/Utility/Touch.hsc +++ b/Utility/Touch.hsc @@ -106,9 +106,8 @@ touchBoth file atime mtime follow = withFilePath file $ \f -> do pokeArray ptr [atime, mtime] r <- syscall f ptr - if (r /= 0) - then throwErrno "touchBoth" - else return () + when (r /= 0) $ + throwErrno "touchBoth" where syscall = if follow then c_lutimes @@ -116,6 +115,6 @@ touchBoth file atime mtime follow = #else #warning "utimensat and lutimes not available; building without symlink timestamp preservation support" -touchBoth _ _ _ _ = return () +touchBoth _ _ _ _ = noop #endif #endif |