File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -386,8 +386,13 @@ def get_output_directory(args: Namespace, config: Dict) -> str:
386
386
out_dir = args .video_dir or dir_config .output
387
387
if dir_config .mirror_module_path and args .file :
388
388
file_path = Path (args .file ).absolute ()
389
- rel_path = file_path .relative_to (dir_config .removed_mirror_prefix )
390
- rel_path = Path (str (rel_path ).lstrip ("_" ))
389
+ print (file_path )
390
+ print (dir_config .removed_mirror_prefix )
391
+ if str (file_path ).startswith (dir_config .removed_mirror_prefix ):
392
+ rel_path = file_path .relative_to (dir_config .removed_mirror_prefix )
393
+ rel_path = Path (str (rel_path ).lstrip ("_" ))
394
+ else :
395
+ rel_path = file_path .stem
391
396
out_dir = Path (out_dir , rel_path ).with_suffix ("" )
392
397
return out_dir
393
398
You can’t perform that action at this time.
0 commit comments