marta-issues icon indicating copy to clipboard operation
marta-issues copied to clipboard

Certain Marta operations can lead to data loss

Open acicovic opened this issue 3 years ago • 5 comments

Hello,

First of all, this is great software. I'm a bit worried because the project seems to be getting stale as of late. Yan, if you're reading this, I hope you are alright.

I've spotted the two following scenarios that can lead to data loss. There might be additional scenarios where this happens, but I have not tested more. In both cases, an existing file gets overwritten without any kind of prompt or error.

  1. Using the rename() function through Lua (and I suspect any other way). If we add the path of a file that already exists, the function will silently overwrite the existing file. Instead, I would expect the rename() function to throw a warning/error and stop.
  2. Using Marta's UI, if we create a new file (in my case I used the context menu), if a file with the same name already exists in the same location, it actually gets overwritten by the new empty file instead of displaying an error.

I think that due to the severity of this, every part of renaming, moving, creating new files etc of the application should be inspected to make sure that this is not possible anywhere else. Also, writing some related tests would protect from any possible future regressions.

acicovic avatar Dec 04 '22 15:12 acicovic

eep. had no idea about this one! thanks for pointing it out. I also hope Yan will make contact soon enough - even just to touch base!

tjex avatar Dec 19 '22 22:12 tjex

I can confirm creating a the new file with same name as an existing one creates a blank file, overwriting the old one without notice. In my case I created a new file via keyboard shortcut (⎇ Option + ⌘ Command + n)

Marta 0.8.1 - MacOS 12.6 (21G115)

pax avatar Jan 11 '23 17:01 pax

You can add one more operation to the list that deletes the whole folder! https://github.com/marta-file-manager/marta-issues/issues/996

eugenesvk avatar Jan 19 '23 07:01 eugenesvk

@yanex - if I may, this should be marked as major bug

pax avatar Oct 01 '23 16:10 pax

Data loss is serious issue for file manager - any plans to fix this?

epnasis avatar Jan 13 '24 13:01 epnasis