adamreeve / Mendeley-FileSync

A script to synchronise PDF files in Mendeley across multiple machines
GNU General Public License v3.0
24 stars 4 forks source link

some doc binaries trigger misnaming #1

Open mkarikom opened 13 years ago

mkarikom commented 13 years ago

sorry this is not really a bug report since i dont have the step to reproduce the behavior

basically i have a problem with some binaries (pdf files, mostly) getting added to records with the renaming string of another record. such that certain pdfs, regardless of their original name and regardless of which record i add them to, will be renamed based on another record. so pdfs for wu, et al; byron et al; marks et al (all fake names) can each be added to a random record and every time they will be renamed according to the record for doe et al.

i have not been able to figure out how to make new binaries do this. i noticed the behavior after running the script and testing the import of some binaries. the script works fine for me but something about the dry run i conducted rendered my mendeley database (the only thing that, when deleted obliterates the strange behavior described above for certain binaries) contaminated. i believe that when doing the dry run i attempted to test the pdf file path updating functionality by moving files that had already been added to other records to the record for doe et al. the script works fine but initially i was concerned that it was not (though no errors were generated) behaving properly, hence the series of tests

i suspect that there is some table in the sqlite database that caches the unique hash functions for any pdf ever added to the library and that this table is not getting updated properly and is getting queried when new pdfs are added such that the sometime affiliation of the affected binaries with doe et al is determining the output of whatever the renaming query is supposed to be doing.

my question is how do i find the table that allows the hashing functions for these affected binaries to persist (so that i can delete them and make them go away forever)?

adamreeve commented 13 years ago

Hi, sorry I don't fully understand what's happening here. Do you mean that you have the "Rename document files" option enabled in Mendeley and the files are being incorrectly renamed? I haven't used this option so I don't know what might be going wrong. I used the sqlitebrowser software to explore the Mendeley database so you might be able to figure out what the problem is if you use that or something similar to look around the database.

Mendeley has a DocumentFiles table that associates files (pdfs) with documents (references), it has a DocumentId column and hash column for the file hash, so a document is associated with a file by the file hash. I think this might be what you're talking about?