diff --git a/README.md b/README.md index 5224524..46df6fd 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ TODO ### Edit entries -TODO +Run `./main.py edit PARAM` where `PARAM` should be either a path to a paper file or an ident in the bibtex index. This will open a text editor to edit the corresponding bibtex entry. ### Data storage diff --git a/backend.py b/backend.py index f339bc8..e827e38 100644 --- a/backend.py +++ b/backend.py @@ -135,7 +135,7 @@ def deleteFile(filename): found = False for key in bibtex.keys(): - if bibtex[key]['file'] == filename: + if os.path.samepath(bibtex[key]['file'], filename): found = True try: os.remove(bibtex[key]['file']) @@ -204,7 +204,7 @@ def getBibtex(entry, file_id = 'both'): pass elif file_id == 'both' or file_id == 'file': for key in bibtex.keys(): - if bibtex[key]['file'] == filename: + if os.path.samepath(bibtex[key]['file'], filename): bibtex_entry = bibtex[key] break return bibtex_entry