-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Important: notes get deleted when they contain certain characters in the title #682
Comments
Yes, |
Ehm ... Patrizio, you cannot be serious with closing this (in which case, I will strongly consider stopping to use QOwnNotes). It is not the responsibility of the user to make sure, that file names are correct. But even if you wanted to delegate that responsibility to the user (and show an error message) that would be a 1000 times better than DELETING the note without the user knowing about it. This is a prio A bug. |
I can't reproduce any deleted notes. For me just the Can you please explain in more detail and step by step what you did, what happened and what you expected. And is there any useful log output if you enable the log widget? |
It's the same as in #683:
Reproduction is as easy as creating a note and adding a question mark to the first line. If I click "Show log" nothing happens. Maybe that is another bug? |
It's just a shortcut to enable the log panel, maybe you have resized that panel very small? |
I never had the problem your are describing on my Windows test installation, but I can try to reproduce it. PS as a reminder: This is a one-person spare-time project with no funding. 😸 |
PPS: If you want to help fix prio A bugs... reasonable pull requests are always welcome! |
I know, Patrizio. I think you're doing an awesome job - I appreciate your efforts as much as I appreciate every open-source project. I am not aware of resizing the log panel but also not sure where to find. IMHO there is a case to make for always parsing file names and eliminating illegal characters of supported file systems. I mean QOwnNotes is a plain file note taking app but the focus is - again IMHO - on the files being perfectly named. I am sorry but I am afraid that I cannot help with development. |
:) thank you
it's usually somewhere on the bottom, but you want to take a look in the Windows settings if it's turned on
and there lies the crux, QOwnNotes doesn't know the file-systems users use... |
You might not exactly know what fs is being used but you can make an educated guess what is likely to be used. You know people use FAT and NTFS and so you forbid all characters which are illegal in filenames on those fs, see also here: https://kb.acronis.com/content/39790 My take on this would be - and I am repeating what I have said before: the focus of QOwnNotes IMHO is |
Hi, I just ran into this myself a couple of days ago inadvertently and unintentionally - I added a question mark to a note title for something that I wasn't sure about and was surprised when the note disappeared. Luckily, I'd only copied and pasted a few lines from another program into the note, so I didn't lose anything permanently. As a user of multiple operating systems, I'd like for notes to be saved with filenames that work on any platform. Besides that, if I forget or make a mistake and include a character in the note title that the file system wouldn't like, I don't want it to become a critical and irrecoverable error. I did a little testing - details below - and I'm happy to try and fix this by either 1) removing these characters I don't know whether there may be other characters that are disallowed in filenames on other platforms, but I can look around a little. Edit: After some brief Google searches, I didn't see an "official" article from Apple on the subject, but it seems that only I feel like ideally, the note list would display the actual note title instead of the now-mangled filename, but maybe that should be a separate issue/request. [1] http://www.informit.com/articles/article.aspx?p=1144082&seqNum=5 Results of testingI tested saving notes containing characters that are considered reserved on Windows. On WindowsThese characters are OK - they just get removed from the filename: For these characters:
On LinuxNone of these characters presented a problem for me; General InfoCurrent Date: |
The problem is if I just remove or replace those characters it will mangle the filenames for all other users that don't use file systems with those restrictions and it's even worse if people are using the same notes on multiple computers with different file systems... it it is really getting messy if your throw Nextcloud notes (who also uses the headline as filename) into the game then notes are constantly removed in a ping pong fashion... |
With the current behaviour, a user who uses multiple OSes could create a note on an OS with less restrictions on filenames and be surprised when they open QOwnNotes on Windows and discover that a note is missing. As for file syncing software - here's what I found:
I don't use ownCloud or Nextcloud, but they shouldn't care about what's in the note or how QOwnNotes finds the title of the note, should they? Wouldn't they only care about the filenames that QOwnNotes has chosen to sync? Not that QOwnNotes should, but QOwnNotes could assign a random, unique string of characters (e.g. "a2tdW6x") to notes and map note titles to those random filenames in a database - and ownCloud/Nextcloud wouldn't care. I feel like no matter which OS is used, QOwnNotes should save (and look for) filenames in the same way: if it replaces characters on one OS, it should replace characters on all of them. If it always replaces the 9 potentially problematic characters, this will avoid the "ping pong", because there will never be a problem syncing the files on different file systems. In the end, though, either 1) mangling filenames or 2) saying "Hey, I couldn't save that note because of a problematic note title" (on Windows) or "Hey, there's no problem here, but you might want to use a different note title, because you won't be able to access this note on Windows" (on non-Windows platforms) would be preferable to allowing users to shoot themselves in the foot. |
There is no persistent note database in QOwnNotes.
Almost all filesystems (it seems aside from FAT and NTFS) have no problems with those characters and their note file names would get changed which will cause distress for the majority of users...
notes are stored in the background, I've yet to find a way to get around this
why would the macOS and Linux users care? :) |
Ah - for some reason, I thought there was; but no matter.
Yes, disrupting things for existing users would be the biggest argument against this change. (However, I think this would affect very few people - it will only affect non-Windows users who have saved notes with these problematic characters in the titles. The effect would be that if they start looking at the note files directly, the files would have different filenames; this could cause a problem if, for whatever reason, another program or a shortcut depended on the QOwnNotes note file.)
Those of us who love QOwnNotes so much that we use it on multiple platforms would care! 😃 I admit that this problem isn't necessarily a big one or a huge concern - if other users are like me, they rarely (if ever) feel the need to use any of |
Phew, it took three hours to get that in... 17.08.7
|
There now is a new release, could you please test it and report if it works for you? |
Tested 17.08.7 successfully on Windows and Linux. On Windows, characters that are not allowed in filenames get converted to underscores; on Linux, the filenames stay as they are - thanks! |
Great, thank you for testing! |
Great work, Patrizio! Thanks a bunch! First bullet point - not sure how to test. Second bullet point test:
|
It was some intense work!
Are you talking about the note list? |
You could also show the title as the title and the file name are always in sync. That would mitigate actually the problem of character replacement completely from an in app perspective. |
I'm not sure what you are talking about, can you please explain in more detail. |
|
You have still not explained what the |
I guess you call it "Note list panel". |
Actual behaviour
Put a question mark into a note title and baaam: it gets deleted.
General Info
Current Date:
Fr Aug 18 14:14:18 2017
Version:
17.08.6
Build date:
Aug 17 2017
Build number:
3180
Platform:
windows
Operating System:
Windows 7 SP 1
Build architecture:
i386
Current architecture:
x86_64
Release:
AppVeyor
Qt Version (build):
5.7.1
Qt Version (runtime):
5.7.1
Portable mode:
no
Settings path / key:
\HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path:
C:\Users\LENOVO\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments:
E:\Programs\PortableApps\QOwnNotes\QOwnNotes.exe
Qt Debug:
0
Locale (system):
de_DE
Locale (interface):
en
Icon theme:
breeze-qownnotes
Notes in current note folder:
116
Enabled scripts:
0
The text was updated successfully, but these errors were encountered: