Skip to content
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

[FEATURE] Limit size of file to open / ignore files / CLI switch to not load recent files #3118

Closed
metakeule opened this issue Sep 24, 2024 · 10 comments
Labels
Milestone

Comments

@metakeule
Copy link

Is your feature request related to a problem? Please describe.

I save also other files than the markdown files that should be opened by qownnotes in the same repository. there was a very big TXT file (18 MB), I accidently did click on. then QOwnnotes did not react anymore and since it wants to reload the last files, it does not start anymore.

If I remove the settings of sqlite file, all my settings are gone. I use the portable mode.
I tried to mess with the QOwnNotes.ini, but it did not help either.

Describe the solution you'd like

Have a default limit for filesizes and maybe don't try to treat txt files as markdown files (I can perfectly open the file in Notepad++ for example).

Describe alternatives you've considered

Have a CLI switch to don't reload the last files would also be helpfull in any case

@pbek
Copy link
Owner

pbek commented Sep 24, 2024

The settings item you were looking for would be ActiveNoteHistoryItem.
But there is also the setting restoreLastNoteAtStartup you could disable.

@pbek
Copy link
Owner

pbek commented Sep 24, 2024

But something to limit the maximum size of listed notes could make sense...

@pbek
Copy link
Owner

pbek commented Sep 24, 2024

Of course, you also just could have renamed the text file before starting QOwnNotes. 😉

@metakeule
Copy link
Author

The settings item you were looking for would be ActiveNoteHistoryItem. But there is also the setting restoreLastNoteAtStartup you could disable.

The point is that a commandline flag on startup would be nice, so you don't need to mess with the ini file.

@metakeule
Copy link
Author

Of course, you also just could have renamed the text file before starting QOwnNotes. 😉

Yeah, there you got me. But what if somebody just not hit the mouse at the right point and does not know that the file is too large? However after an update to the latest version, it would open the file after 15 minutes on a fast system...

@metakeule
Copy link
Author

The file in question has some very long lines with just equal signs (======...) in case this helps.....

pbek added a commit that referenced this issue Sep 28, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
@pbek
Copy link
Owner

pbek commented Sep 28, 2024

24.9.8

  • You can now set the maximum note file size in the Panels settings to prevent
    the loading of very large notes (for 3118)
    • Default is 1 MB

@pbek pbek added this to the 24.9.8 milestone Sep 28, 2024
@pbek
Copy link
Owner

pbek commented Sep 28, 2024

There now is a new release, could you please test it and report if it works for you?

pbek added a commit that referenced this issue Sep 28, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
@pbek pbek closed this as completed Sep 30, 2024
@metakeule
Copy link
Author

works perfectly

@pbek
Copy link
Owner

pbek commented Oct 3, 2024

Great, thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants