Skip to content

Commit

Permalink
commands.init:import_files - fix support for Windows-formatted paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Dec 18, 2024
1 parent 225e5c4 commit 4bbbcc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion digiarch/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def import_files(ctx: Context, avid: AVID, db: FilesDB, db_old: Connection, *log

path_str: str
for [path_str] in paths_cursor:
path = Path(PureWindowsPath(path_str.replace("\\", "\\\\"))) if "\\" in path_str else Path(path_str)
path = Path(PureWindowsPath(path_str)) if "\\" in path_str else Path(path_str)
if "originaldocuments" not in (path_parts := [p.lower() for p in path.parts]):
Event.from_command(ctx, "skip").log(
WARNING,
Expand Down

0 comments on commit 4bbbcc2

Please sign in to comment.