diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-04 12:24:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-04 12:44:51 -0400 |
commit | f1c7dc12127fcbad411c28df57e9ce194bd66509 (patch) | |
tree | 0d0eb4c787e8324c4992537c9b194c9d7d6154ad /Utility/Touch.hsc | |
parent | 44b115e0b11b3cb64301ed6dc478c597062ac0b6 (diff) |
fix touch and statfs to work on any files in any locale
Use withCAString rather than withCString.
XXX Actually, this only works in non-unicode locales when presented with
unicode characters. Help?
Diffstat (limited to 'Utility/Touch.hsc')
-rw-r--r-- | Utility/Touch.hsc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/Touch.hsc b/Utility/Touch.hsc index fd3320cd1..41d3e17b8 100644 --- a/Utility/Touch.hsc +++ b/Utility/Touch.hsc @@ -64,7 +64,7 @@ foreign import ccall "utimensat" touchBoth file atime mtime follow = allocaArray 2 $ \ptr -> - withCString file $ \f -> do + withCAString file $ \f -> do pokeArray ptr [atime, mtime] r <- c_utimensat at_fdcwd f ptr flags when (r /= 0) $ throwErrno "touchBoth" @@ -101,7 +101,7 @@ foreign import ccall "lutimes" touchBoth file atime mtime follow = allocaArray 2 $ \ptr -> - withCString file $ \f -> do + withCAString file $ \f -> do pokeArray ptr [atime, mtime] r <- syscall f ptr if (r /= 0) |