Skip to content

Commit be905a8

Browse files
committed
Working version of first commit.
1 parent 4e0786c commit be905a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/ingest_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def convert_to_kepub(self) -> tuple[bool,str]:
168168
def delete_current_file(self) -> None:
169169
"""Deletes file just processed from ingest folder"""
170170
os.remove(self.filepath) # Removes processed file
171-
if os.path.dirname(self.filepath) != self.ingest_folder: # File was in ingest_folder, no directories to delete
171+
if not os.path.samefile(os.path.dirname(self.filepath),self.ingest_folder): # File not in ingest_folder, subdirectories to delete
172172
subprocess.run(["find", f"{os.path.dirname(self.filepath)}", "-type", "d", "-empty", "-delete"]) # Removes any now empty folders including parent directory
173173

174174

0 commit comments

Comments
 (0)