Skip to content

Commit 3d7f8a9

Browse files
committed
Disambiguate createLink/createSymbolicLink errors
Per the comments on PR #65, it should be unambiguous.
1 parent 484566b commit 3d7f8a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

System/Posix/Files.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ createLink :: FilePath -> FilePath -> IO ()
228228
createLink name1 name2 =
229229
withFilePath name1 $ \s1 ->
230230
withFilePath name2 $ \s2 ->
231-
throwErrnoIfMinus1_ ("createLink "++name1++" to "++name2) (c_link s1 s2)
231+
throwErrnoIfMinus1_ ("createLink (target: "++name1++") (linkpath: "++name2++")") (c_symlink s1 s2)
232232

233233
-- | @removeLink path@ removes the link named @path@.
234234
--
@@ -252,7 +252,7 @@ createSymbolicLink :: FilePath -> FilePath -> IO ()
252252
createSymbolicLink file1 file2 =
253253
withFilePath file1 $ \s1 ->
254254
withFilePath file2 $ \s2 ->
255-
throwErrnoIfMinus1_ ("createSymbolicLink "++file1++" to "++file2) (c_symlink s1 s2)
255+
throwErrnoIfMinus1_ ("createSymbolicLink (target: "++file1++") (linkpath: "++file2++")") (c_symlink s1 s2)
256256

257257
foreign import ccall unsafe "symlink"
258258
c_symlink :: CString -> CString -> IO CInt

0 commit comments

Comments
 (0)