mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
fix possible issues with destination drive path
This commit is contained in:
parent
7992ba6969
commit
e42918997e
1 changed files with 9 additions and 2 deletions
11
start.py
11
start.py
|
|
@ -348,8 +348,15 @@ def run_disk_mapping_commands(settings):
|
|||
|
||||
mappings = disk_mapping.get(low_platform) or []
|
||||
for source, destination in mappings:
|
||||
destination = destination.rstrip('/')
|
||||
source = source.rstrip('/')
|
||||
if low_platform == "windows":
|
||||
destination = destination.replace("/", "\\").rstrip("\\")
|
||||
source = source.replace("/", "\\").rstrip("\\")
|
||||
# Add slash after ':' ('G:' -> 'G:\')
|
||||
if destination.endswith(":"):
|
||||
destination += "\\"
|
||||
else:
|
||||
destination = destination.rstrip("/")
|
||||
source = source.rstrip("/")
|
||||
|
||||
if low_platform == "darwin":
|
||||
scr = f'do shell script "ln -s {source} {destination}" with administrator privileges' # noqa
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue