Fixed forward slash being stripped from Unix paths
This commit is contained in:
parent
cf1ce6bb24
commit
45e765862d
1 changed files with 1 additions and 7 deletions
|
|
@ -541,17 +541,13 @@ class Library:
|
|||
"""
|
||||
|
||||
path = os.path.normpath(path).strip('\\')
|
||||
prefix = ''
|
||||
if os.name != 'nt' and path != '/':
|
||||
path = path.strip('/')
|
||||
prefix = '/'
|
||||
|
||||
if ts_core.TS_FOLDER_NAME in path:
|
||||
return 1
|
||||
|
||||
try:
|
||||
self.clear_internal_vars()
|
||||
self.library_dir = prefix + path
|
||||
self.library_dir = path
|
||||
self.verify_ts_folders()
|
||||
self.save_library_to_disk()
|
||||
self.open_library(self.library_dir)
|
||||
|
|
@ -604,8 +600,6 @@ class Library:
|
|||
|
||||
return_code: int = 2
|
||||
path = os.path.normpath(path).rstrip('\\')
|
||||
if os.name != 'nt' and path != '/':
|
||||
path = path.strip('/')
|
||||
|
||||
# Strip an errant '.TagStudio' from the path if the user pointed to that inner folder.
|
||||
if ts_core.TS_FOLDER_NAME in path:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue