fabiocolacio / Marker

🖊 A gtk3 markdown editor
GNU General Public License v3.0
836 stars 75 forks source link

Sidebar rename is dangerous #403

Open QmwJlHuSg9pa opened 1 year ago

QmwJlHuSg9pa commented 1 year ago

Hi, just installed Marker via Flathub to give it a try. Mind you, the version there (2020.04.04) is outdated.

Sidebar renaming is broken and destructive; it can have adverse consequences (file loss).

Here's what happened:

  1. I misclicked and opened an ODS (spreadsheet) file by mistake. Curiously, the output in Marker was void -- I kind of at least expected a "not Markdown content" warning, or even just a garbled interpretation of the file's bytes. The ODS file itself was untouched, at least.
  2. Whatever, lets open an actual Markdown file.
  3. Now, Lets try renaming the Markdown file in sidebar (My thinking: does this actually rename the file within the filesystem, or just within a hypothetical, abstracted database representation)? OK, it renames the actual file.
  4. Then, I tried to double click on the ODS file in sidebar, out of curiosity. This is where things went wrong. Marker erroneously renamed the file without my input, to the new name of the aforementioned markdown file! I.e. myodsfile.ods -> newmarkdownname.md
  5. This not being bad enough, the renamed ODS file was now 0 bytes in my filesystem! Despite not pressing "Save", nor modifying the file contents within Marker's interface.

Notes:

I don't know how things behave in 2023, but file renaming really should require a confirmation dialogue, and it shouldn't be so easy to overwrite (or delete) another file within the same directory!

I can not recommend this program (at least the Flathub distribution) to anyone! No, I spent a day trying to recover my lost file.