Skip to content

Conversation

@oherrala
Copy link
Contributor

@oherrala oherrala commented Jun 4, 2016

POSIX's ENOENT error doesn't specify if the problem was with source or
destination path. Throw error mentioning both paths instead of only
first one.

Fixes #60

POSIX's ENOENT error doesn't specify if the problem was with source or
destination path. Throw error mentioning both paths instead of only
first one.

Fixes #60
withFilePath file1 $ \s1 ->
withFilePath file2 $ \s2 ->
throwErrnoPathIfMinus1_ "createSymbolicLink" file1 (c_symlink s1 s2)
throwErrnoIfMinus1_ ("createSymbolicLink "++file1++" to "++file2)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a link (symbolic or hard) this message may be confusing. When we say ln s1 s2, we are creating s2 which points to s1, is that a s1 to s2 link or s2 to s1? The unix manual for symlink uses the terms linkpath (s2) and target (s1), maybe we can use the same terminology in the error message here. That way it will also be easy to correlate the error message with syscall manual when debugging.

@luispedro
Copy link
Contributor

This is still open after >2 years, can it be updated and merged? It's still an issue.

luispedro added a commit to luispedro/unix that referenced this pull request Nov 11, 2018
Per the comments on PR haskell#65, it should be unambiguous.
@oherrala oherrala closed this Jul 5, 2019
@oherrala oherrala deleted the fix-issue60 branch July 5, 2019 13:06
luispedro added a commit to luispedro/unix that referenced this pull request Feb 16, 2021
Per the comments on PR haskell#65, it should be unambiguous.
luispedro added a commit to luispedro/unix that referenced this pull request Feb 20, 2021
Per the comments on PR haskell#65, it should be unambiguous.
luispedro added a commit to luispedro/unix that referenced this pull request Feb 22, 2021
Per the comments on PR haskell#65, it should be unambiguous.
hs-viktor pushed a commit that referenced this pull request Feb 24, 2021
Per the comments on PR #65, it should be unambiguous.
hasufell pushed a commit to hasufell/unix that referenced this pull request Jul 19, 2022
Per the comments on PR haskell#65, it should be unambiguous.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error messages in rename

3 participants