This commit is contained in:
RemixDev 2021-07-16 14:49:10 +02:00
parent 11447d606b
commit 263ecd4be0
No known key found for this signature in database
GPG Key ID: B33962B465BDB51C
1 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,9 @@ def getMusicFolder():
if (homedata / '.config' / 'user-dirs.dirs').is_file() and musicdata == "":
with open(homedata / '.config' / 'user-dirs.dirs', 'r') as f:
userDirs = f.read()
musicdata = re.search(r"XDG_MUSIC_DIR=\"(.*)\"", userDirs).group(1)
musicdata_search = re.search(r"XDG_MUSIC_DIR=\"(.*)\"", userDirs)
if musicdata_search:
musicdata = musicdata_search.group(1)
musicdata = Path(os.path.expandvars(musicdata))
musicdata = checkPath(musicdata)
if os.name == 'nt' and musicdata == "":