diff --git a/orvani/__pycache__/orvani.cpython-310.pyc b/orvani/__pycache__/orvani.cpython-310.pyc index e9a30dc..5cbc070 100644 Binary files a/orvani/__pycache__/orvani.cpython-310.pyc and b/orvani/__pycache__/orvani.cpython-310.pyc differ diff --git a/orvani/orvani.py b/orvani/orvani.py index 1eaf8bb..a994d01 100644 --- a/orvani/orvani.py +++ b/orvani/orvani.py @@ -160,8 +160,8 @@ class OrvaniTag: self.__cd(target.parent) if fop: target.unlink(missing_ok=True) - if file in self.DB: - del self.DB[file] + if target.name in self.DB: + del self.DB[target.name] if not self.DB: Path(self.FILE).unlink(missing_ok=True) self.__save() @@ -188,7 +188,7 @@ class OrvaniTag: if self.DB[sourcefile]: sourcedata = self.DB[sourcefile] if not retain: - self.purge(source) + self.delete(source) self.__cd(destfolder) self.DB.update( { destfile : sourcedata } ) self.__save() @@ -209,10 +209,11 @@ class OrvaniTag: path = '.' target = Path(path) if target.exists(): - self.__cd(target.parent) + self.__cd(path) DB = self.DB.copy() for file in self.DB.keys(): - if not Path(file).is_file(): + f = target / file + if not f.is_file(): if file in self.DB: del DB[file] self.DB = DB diff --git a/orvani/plugins/__pycache__/hashslashslash.cpython-310.pyc b/orvani/plugins/__pycache__/hashslashslash.cpython-310.pyc index 23aee41..ea8b62e 100644 Binary files a/orvani/plugins/__pycache__/hashslashslash.cpython-310.pyc and b/orvani/plugins/__pycache__/hashslashslash.cpython-310.pyc differ