Extractor: added warning messages if aligned folder contains files that will be deleted.
This commit is contained in:
@@ -682,8 +682,11 @@ def main(input_dir,
|
|||||||
|
|
||||||
if output_path.exists():
|
if output_path.exists():
|
||||||
if not manual_output_debug_fix and input_path != output_path:
|
if not manual_output_debug_fix and input_path != output_path:
|
||||||
for filename in Path_utils.get_image_paths(output_path):
|
output_images_paths = Path_utils.get_image_paths(output_path)
|
||||||
Path(filename).unlink()
|
if len(output_images_paths) > 0:
|
||||||
|
io.input_bool("WARNING !!! \n %s contains files! \n They will be deleted. \n Press enter to continue." % (str(output_path)), False )
|
||||||
|
for filename in output_images_paths:
|
||||||
|
Path(filename).unlink()
|
||||||
else:
|
else:
|
||||||
output_path.mkdir(parents=True, exist_ok=True)
|
output_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user