Fixed bug if ~/Music folder doesn't exist

This commit is contained in:
Kepoor Hamnond 2017-03-16 17:54:26 +00:00
parent df86541d62
commit 7fed83b8d4

View file

@ -44,6 +44,8 @@ class Ripper:
if parse_directory(self) != None: if parse_directory(self) != None:
for index, loc in enumerate(locations): for index, loc in enumerate(locations):
new_file_name = parse_directory(self) + "/" + loc new_file_name = parse_directory(self) + "/" + loc
if not os.path.exists(parse_directory(self)):
os.makedirs(parse_directory(self))
os.rename(loc, new_file_name) os.rename(loc, new_file_name)
locations[index] = new_file_name locations[index] = new_file_name
# I'd just go on believing that code this terrible doesn't exist. # I'd just go on believing that code this terrible doesn't exist.