Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow native symlinks to non-existing targets in 'nativestrict' mode #10

Merged
merged 1 commit into from
May 21, 2015

Commits on May 20, 2015

  1. Allow native symlinks to non-existing targets in 'nativestrict' mode

    Windows native symlinks must match the type of their target (file or
    directory), otherwise native Windows tools will fail. Creating symlinks in
    'nativestrict' mode currently requires the target to exist in order to
    check its type.
    
    However, the target of a symlink can change at any time after the symlink
    has been created. Thus users of native symlinks must be prepared to deal
    with type mismatches anyway. Checking the target type at symlink creation
    time is not a good reason to violate the symlink() API specification.
    
    In 'nativestrict' mode, always create native symlinks. Choose the symlink
    type according to the target if it exists. Otherwise check the target path
    for a trailing '/' as hint to create a directory symlink.
    
    This allows callers to explicitly specify the expected target type, e.g.:
    
      $ ln -s test/ link-to-test
      $ mkdir test
    
    Signed-off-by: Karsten Blees <blees@dcon.de>
    kblees committed May 20, 2015
    Configuration menu
    Copy the full SHA
    9af724f View commit details
    Browse the repository at this point in the history