Skip to content

Commit

Permalink
Removing my home dir? I hardly know her!
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Jan 14, 2024
1 parent 278dfb1 commit e664ae8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hyperplane/utils/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ def rm(gfile: Gio.File) -> None:
except FileNotFoundError:
path = None

if path == shared.home_path:
logging.debug("Someone tried to remove ~.")
return

if path and path.is_dir():
# Remove the .trashinfo file if the file is in the trash
# This needs to be done synchronously because Gio won't find the file
Expand Down

0 comments on commit e664ae8

Please sign in to comment.