This commit is contained in:
Joey Hess 2012-04-21 23:32:33 -04:00
parent bee420bd2d
commit ed79596b75
27 changed files with 56 additions and 52 deletions

View file

@ -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