BlendPath.as_path() now refuses to convert blendfile-relative paths

When a path starts with b'//' it will not be converted to a PurePath, as
the handling of such filenames is platform dependent (Windows handles those
weirdly, like appending a slash to any path).
This commit is contained in:
Sybren A. Stüvel
2019-01-02 15:14:50 +01:00
parent 5635895d0c
commit 19216cb12e
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ class BlockIterator:
# We've gone through all the blocks in this file, now open the libraries
# and iterate over the blocks referred there.
for lib_bpath, idblocks in blocks_per_lib.items():
lib_path = lib_bpath.to_path()
lib_path = pathlib.Path(lib_bpath.to_path())
try:
lib_path = lib_path.resolve()
except FileNotFoundError: