Spaces:
Running
on
Zero
Running
on
Zero
Fix Bug in file renaming
Browse files- utils/file_utils.py +1 -1
- utils/image_utils.py +1 -1
utils/file_utils.py
CHANGED
@@ -49,7 +49,7 @@ def rename_file_to_lowercase_extension(file_path: str) -> str:
|
|
49 |
data = f.read()
|
50 |
with open(new_file_path, 'wb') as f:
|
51 |
f.write(data)
|
52 |
-
print(f"
|
53 |
# Optionally, remove the original file after copying
|
54 |
#os.remove(file_path)
|
55 |
except Exception as inner_e:
|
|
|
49 |
data = f.read()
|
50 |
with open(new_file_path, 'wb') as f:
|
51 |
f.write(data)
|
52 |
+
print(f"Copied {file_path} to {new_file_path}\n")
|
53 |
# Optionally, remove the original file after copying
|
54 |
#os.remove(file_path)
|
55 |
except Exception as inner_e:
|
utils/image_utils.py
CHANGED
@@ -750,7 +750,7 @@ def apply_lut_to_image_path(lut_filename: str, image_path: str) -> tuple[Image,
|
|
750 |
if img_lut is not None:
|
751 |
new_filename = name + "_"+ lut_name + new_ext
|
752 |
new_image_path = os.path.join(directory, new_filename)
|
753 |
-
delete_image(image_path)
|
754 |
img = img_lut
|
755 |
img.save(new_image_path, format='PNG')
|
756 |
print(f"Image with LUT saved as {new_image_path}")
|
|
|
750 |
if img_lut is not None:
|
751 |
new_filename = name + "_"+ lut_name + new_ext
|
752 |
new_image_path = os.path.join(directory, new_filename)
|
753 |
+
#delete_image(image_path) - renamed with lut name
|
754 |
img = img_lut
|
755 |
img.save(new_image_path, format='PNG')
|
756 |
print(f"Image with LUT saved as {new_image_path}")
|