Jump to content

Files being overwritten


johnstaveley

Recommended Posts

I am using 5.8.4.6870.

 

I copy several files of the same name to a note on Evernote, say Program.cs which all contain different content. I then access any of them and they all have the same content as the last one copied in. If I rename one of the files, it renames them all. If Evernote is meant to have this behaviour it should make it clear it is going to overwrite the contents of the files. Is this a bug of a feature?

Link to comment
  • Level 5*

How did you copy the files? Maybe it's a thing in Evernote that attachments must have different names. Try renaming the files *before* you copy them in to test that theory out. You can also consider copying the files to different notes.

Link to comment

Copy and paste. Maybe it is a thing. What I'm saying is that it is a bad thing. If I have to rename all the files before pasting then it will take me hours as all the files I copy in are called by the same name. What I was asking is when is it going to be fixed?

Link to comment

Just checked and the file name needs to be globally unique across all of your notes in evernote. Thus if I change the content of Program.cs in one note, it changes the contents of all files called Program.cs across all notes. If this is a feature it's a pretty ***** one.

Link to comment
  • Level 5*

Just checked and the file name needs to be globally unique across all of your notes in evernote. Thus if I change the content of Program.cs in one note, it changes the contents of all files called Program.cs across all notes. If this is a feature it's a pretty ***** one.

I'm not sure of that.  As a test I just created simple spreadsheet and put it into two notes, and left the titles of both notes the same, Book1.xlsx.  I then open and modified the spreadsheet in one of the notes and then saved it.  I opened the spreadsheet in the second note and it was in its original state, none of the changes were there. I did the same putting two copies of the spreadsheet into the same note.  Same result, I was able to get different content and I could also change the name of one of the spreadsheets and the other remained the same.  

 

I got the files into EN through drag/drop.  When I copy/pasted the files I got the same issues as the OP.  So I would guess the issue is copy/paste.  Try drag and drop.  FWIW.

Link to comment

I dispute whether the problem is copy/paste or drag/drop, it should have the same effect at the end of the day. The problem seems to be where evernote is storing the files. This is in the logs:

 

15:33:13 [4140] Renamed external file "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs" to "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs.backup"
15:33:14 [4512] External file "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs", resource 1419/0, is gone, forgetting...
15:33:15 [4140] Opened default external editor for resource 1419/1, file "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs"
15:33:16 [4140] External file "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs", resource 1419/1, is unchanged
15:33:16 [4140] Renamed external file "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs" to "C:\Users\d-JStaveley\AppData\Local\Evernote\Evernote\Databases\Attachments\Code Snippet.cs.backup"
 

It seems to be storing the files in a central location which if not globally unique will overwrite whatever else is written there. Since I have many files called Code Snippet.cs it will overwrite whatever is there.

Link to comment
  • Level 5*

Don't know what to say other than drag/drop didn't have the problem but cut/paste did in the test I ran, a limited test for sure.  But it did replicate the OPs issue.

 

Bug report would be in order if one expects cut/paste to work like drag/drop, which I would think they should as well.

Link to comment
  • Level 5*

You should note that attachments are not stored in the Databases\Attachments folder, except on a temporary basis. They are stored wholly inside the SQlite database (your .exb file). The Attachments folder is used to store temporary copies of the embedded files when you open them in an external editor/viewer. It's not clear to me that Evernote is the one creating .backup files there -- I'm guessing that it's an external program used to open the attachment. I think that this is a red herring.

 

Anyways, I tested this scenario, with two different copies of a piece of source code, "Program.cpp", dragged and dropped into a single note. These resulted in distinct attachments, verified by opening each one in Notepad++, and making a change to each one, and saving them. Kicked them out of Notepad++, and reopened them from Evernote; the separate changes showed up as expected. I renamed one of the copies, and that worked fine.Then I did a cut/paste from Explorer for one of the same files into the note, and it also is is stored as a completely separate attachment, again verified by opening it in Notepad++.

 

In other words, this scenario seemed to work fine for me, and there is apparently no problem with storing attachments that have the same name. I think that there needs to be a more detailed scenario to isolate any problems here.

Link to comment
  • Level 5*

Jeff,

 

Would you mind a copy/paste of same file into a note and see if that fails.  Not sure I see that in the above.  That case did fail for me.

 

And by the way, cut/paste does not fail for me.  So it may just be copy/paste, which seems very weird to me.

Link to comment
  • Level 5*

Would you mind a copy/paste of same file into a note and see if that fails.  Not sure I see that in the above.  That case did fail for me.

I did exactly that; Select a file in Explorer, right-click/Copy, paste into Evernote note. Worked fine.

Link to comment
  • Level 5*

Hmmm, this is what I see when I copy/paste the same file into the same note twice, which I think is what the OP reported. Every time. Process.

1. Copy/paste the same file into a note twice.
2. Rename either file and the name of the other changes.
3. Modify/save the second file and the changes appear in the first file.
4. Rename the second file and the first file does NOT change at this point and at this point changes in one file don't appear in the other.

Enough discovery for me for one day, I can only absorb so much wierdness.

Link to comment
  • Level 5*

OK, one more thing. I do see weirdness if I copy the exact same file from the exact same folder into an Evernote note via drag/drop. Not sure what the intent would be, but it doesn't seem to be handled correctly. Yes, I am on the latest release.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...