Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / Packages / unix
Source project has a limited visibility.
  • Niklas Hambüchen's avatar
    fae5cdc1
    Fix error message of `createSymbolicLink`. · fae5cdc1
    Niklas Hambüchen authored
    Consider `ln` (or any other Unix tool):
    
        $ ln -s file1 file2
        $ ls -l file2
        lrwxrwxrwx 1 niklas niklas 5 Feb  8 03:09 file2 -> file1
        $ ln -s file1 file2
        ln: failed to create symbolic link 'file2': File exists
    
    The file name mentioned in the error ("link2") is the one
    that *could not be created*, not the content of the pointer.
    
    `createSymbolicLink` got this wrong so far, it would print
    
        file1: createSymbolicLink: already exists (File exists)
    
    which is wrong, this file doesn't already exist.
    
    This commit fixes it.
    fae5cdc1
    History
    Fix error message of `createSymbolicLink`.
    Niklas Hambüchen authored
    Consider `ln` (or any other Unix tool):
    
        $ ln -s file1 file2
        $ ls -l file2
        lrwxrwxrwx 1 niklas niklas 5 Feb  8 03:09 file2 -> file1
        $ ln -s file1 file2
        ln: failed to create symbolic link 'file2': File exists
    
    The file name mentioned in the error ("link2") is the one
    that *could not be created*, not the content of the pointer.
    
    `createSymbolicLink` got this wrong so far, it would print
    
        file1: createSymbolicLink: already exists (File exists)
    
    which is wrong, this file doesn't already exist.
    
    This commit fixes it.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.