diff --git a/src/setuptools_scm/file_finder.py b/src/setuptools_scm/file_finder.py index ce7cbad5..77ec1463 100644 --- a/src/setuptools_scm/file_finder.py +++ b/src/setuptools_scm/file_finder.py @@ -50,6 +50,6 @@ def _link_not_in_scm(n): # dirpath + filename with symlinks preserved fullfilename = os.path.join(dirpath, filename) if os.path.normcase(os.path.realpath(fullfilename)) in scm_files: - res.append(os.path.join(path, os.path.relpath(fullfilename, path))) + res.append(os.path.join(path, os.path.relpath(fullfilename, realpath))) seen.add(realdirpath) return res