Commit c927514c authored by fred's avatar fred

create-sound-files: create parent directories if needed

parent 64439ffa
......@@ -82,7 +82,7 @@ class Command(BaseCommand):
def create(self, soundfile, format):
file_path = soundfile.get_format_path(format)
if not os.path.exists(os.path.dirname(file_path)):
if self.copy and os.path.splitext(soundfile.file.path)[-1].strip('.') == format:
shutil.copy(soundfile.file.path, file_path)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment