mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Improved support for projects located on Windows network drives // Issue #3417
This commit is contained in:
@ -170,8 +170,8 @@ class LibBuilderBase:
|
||||
):
|
||||
return True
|
||||
# try to resolve paths
|
||||
root_path = os.path.realpath(root_path)
|
||||
child_path = os.path.realpath(child_path)
|
||||
root_path = os.path.abspath(root_path)
|
||||
child_path = os.path.abspath(child_path)
|
||||
return (
|
||||
os.path.commonprefix([root_path + os.path.sep, child_path])
|
||||
== root_path + os.path.sep
|
||||
|
@ -40,7 +40,7 @@ class PackageManagerSymlinkMixin:
|
||||
pkg_dir, spec = self.resolve_symlink(path)
|
||||
if not pkg_dir:
|
||||
return None
|
||||
pkg = PackageItem(os.path.realpath(pkg_dir))
|
||||
pkg = PackageItem(os.path.abspath(pkg_dir))
|
||||
if not pkg.metadata:
|
||||
pkg.metadata = self.build_metadata(pkg.path, spec)
|
||||
return pkg
|
||||
|
@ -482,7 +482,7 @@ class PackageItem:
|
||||
|
||||
def __eq__(self, other):
|
||||
conds = [
|
||||
os.path.realpath(self.path) == os.path.realpath(other.path)
|
||||
os.path.abspath(self.path) == os.path.abspath(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.realpath(self.path))
|
||||
return hash(os.path.abspath(self.path))
|
||||
|
||||
def exists(self):
|
||||
return os.path.isdir(self.path)
|
||||
|
@ -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.realpath(root), f))
|
||||
os.path.relpath(os.path.join(os.path.abspath(root), f))
|
||||
)
|
||||
return result
|
||||
|
||||
|
Reference in New Issue
Block a user