Fix T65904: External files with same path on different drives are packed once
External files with the same path on different drives are packed as a single file. In this commit the drive letter is taken into account when determining the path inside `_outside_project`, so that they are distinct.
This commit is contained in:
parent
f0836417a4
commit
113b0c9bb8
@ -7,6 +7,7 @@ changed functionality, fixed bugs).
|
|||||||
|
|
||||||
- Migrated from Pipenv to Poetry for managing Python package dependencies.
|
- Migrated from Pipenv to Poetry for managing Python package dependencies.
|
||||||
- Windows compatibility fix when using mapped network storage.
|
- Windows compatibility fix when using mapped network storage.
|
||||||
|
- Windows compatibility fix when using different assets with the same path but on different drives.
|
||||||
|
|
||||||
|
|
||||||
## Version 1.1.1 (2019-04-18)
|
## Version 1.1.1 (2019-04-18)
|
||||||
|
|||||||
@ -329,8 +329,16 @@ class Packer:
|
|||||||
for path in self._new_location_paths:
|
for path in self._new_location_paths:
|
||||||
act = self._actions[path]
|
act = self._actions[path]
|
||||||
assert isinstance(act, AssetAction)
|
assert isinstance(act, AssetAction)
|
||||||
# Like a join, but ignoring the fact that 'path' is absolute.
|
|
||||||
act.new_path = pathlib.Path(self._target_path, '_outside_project', *path.parts[1:])
|
# Remove the base of the path, effectively removing the 'absoluteness'.
|
||||||
|
# On POSIX this turns '/path/file.txt' into 'path/file.txt'.
|
||||||
|
# On Windows this turns 'X:/path/file.txt' into 'X/path/file.txt'.
|
||||||
|
if path.drive:
|
||||||
|
path_parts = (path.drive[0], *path.parts[1:])
|
||||||
|
else:
|
||||||
|
path_parts = path.parts[1:]
|
||||||
|
|
||||||
|
act.new_path = pathlib.Path(self._target_path, '_outside_project', *path_parts)
|
||||||
|
|
||||||
def _group_rewrites(self) -> None:
|
def _group_rewrites(self) -> None:
|
||||||
"""For each blend file, collect which fields need rewriting.
|
"""For each blend file, collect which fields need rewriting.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user