Revert "Improved support for projects located on Windows network drives // Issue #3417"

This reverts commit a0c959be28.
This commit is contained in:
Ivan Kravets
2023-04-21 11:25:48 +03:00
parent 6ee9cc04fb
commit 9344f3cd81
4 changed files with 6 additions and 6 deletions

View File

@ -170,8 +170,8 @@ class LibBuilderBase:
):
return True
# try to resolve paths
root_path = os.path.abspath(root_path)
child_path = os.path.abspath(child_path)
root_path = os.path.realpath(root_path)
child_path = os.path.realpath(child_path)
return (
os.path.commonprefix([root_path + os.path.sep, child_path])
== root_path + os.path.sep

View File

@ -40,7 +40,7 @@ class PackageManagerSymlinkMixin:
pkg_dir, spec = self.resolve_symlink(path)
if not pkg_dir:
return None
pkg = PackageItem(os.path.abspath(pkg_dir))
pkg = PackageItem(os.path.realpath(pkg_dir))
if not pkg.metadata:
pkg.metadata = self.build_metadata(pkg.path, spec)
return pkg

View File

@ -482,7 +482,7 @@ class PackageItem:
def __eq__(self, other):
conds = [
os.path.abspath(self.path) == os.path.abspath(other.path)
os.path.realpath(self.path) == os.path.realpath(other.path)
if self.path and other.path
else self.path == other.path,
self.metadata == other.metadata,
@ -490,7 +490,7 @@ class PackageItem:
return all(conds)
def __hash__(self):
return hash(os.path.abspath(self.path))
return hash(os.path.realpath(self.path))
def exists(self):
return os.path.isdir(self.path)

View File

@ -134,7 +134,7 @@ class ProjectGenerator:
for root, _, files in os.walk(self.config.get("platformio", "src_dir")):
for f in files:
result.append(
os.path.relpath(os.path.join(os.path.abspath(root), f))
os.path.relpath(os.path.join(os.path.realpath(root), f))
)
return result