microsoft / microsoft/VFSForGit

POSIX: Implement TryGetNormalizedPathImplementation and GetFinalPathName and properly handle firmlinks on Catalina

Open
#1,358 0 comments 0 reactions 1 assignee View on GitHub

@pmj is already working on this.

Since Aug 7, 2019.

affects: correctness platform: linux platform: macOS
Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

We need to implement TryGetNormalizedPathImplementation (or verify that paths across symlinks work properly with the current implementation).

TryGetNormalizedPathImplementation should return the canonical path of a file.

https://github.com/microsoft/VFSForGit/blob/69c3b45a253a710489222f954780c0a0c38d3bdc/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.Shared.cs#L5

        public static bool TryGetNormalizedPathImplementation(string path, out string normalizedPath, out string errorMessage)
        {
            // TODO(POSIX): Properly determine normalized paths (e.g. across links)
            errorMessage = null;
            normalizedPath = path;
            return true;
        }

https://github.com/microsoft/VFSForGit/blob/69c3b45a253a710489222f954780c0a0c38d3bdc/GVFS/GVFS.NativeHooks.Common/common.posix.cpp#L14

PATH_STRING GetFinalPathName(const PATH_STRING& path)
{
    // TODO(Mac): Implement
    return path;
}
Update (7/30/2019)

See also the discussion here:

https://github.com/microsoft/VFSForGit/pull/1337#discussion_r307829313

We need to make sure that firmlinks are handled properly and that could require changes to GetRelativePath in PrjFSLib as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.