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

No error is given when trying to save to an unwriteable path #1359

Open
elouin opened this issue Feb 16, 2025 · 5 comments
Open

No error is given when trying to save to an unwriteable path #1359

elouin opened this issue Feb 16, 2025 · 5 comments
Labels
bug Something isn't working high prio This has high priority

Comments

@elouin
Copy link

elouin commented Feb 16, 2025

Describe the bug
The default save location is set to / and since the user doesn't have rights to write there, the file isn't saved and there is no note about it. This happens for example, when you haven't saved the document yet and are closing rnote. Lost a few documents this way already. I know that for some people it sets the home directory as the default save location.

To Reproduce
Steps to reproduce the behavior:

  1. Open rnote
  2. make changes
  3. close the window without saving
  4. click on save on the dialog

Expected behavior
I expect the Dialog to either give a writeable path or to at least error and give the option to change the path, when trying to save to an unwriteable location.

Console Output

~> flatpak --env=RUST_LOG=DEBUG --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
2025-02-16T11:51:31.159936Z DEBUG rnote: .. tracing subscriber initialized.
2025-02-16T11:51:31.714604Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for svg id=None    
2025-02-16T11:51:31.714626Z DEBUG selectors::matching: Matching complex selector :root for svg id=None    
2025-02-16T11:51:31.714632Z DEBUG selectors::matching: Matching complex selector image for svg id=None    
2025-02-16T11:51:31.714636Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.714640Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.714644Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.714647Z DEBUG selectors::matching: Matching complex selector defs for svg id=None    
2025-02-16T11:51:31.714651Z DEBUG selectors::matching: Matching complex selector clipPath for svg id=None    
2025-02-16T11:51:31.714655Z DEBUG selectors::matching: Matching complex selector mask for svg id=None    
2025-02-16T11:51:31.714664Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.714669Z DEBUG selectors::matching: Matching complex selector desc for svg id=None    
2025-02-16T11:51:31.714677Z DEBUG selectors::matching: Matching complex selector title for svg id=None    
2025-02-16T11:51:31.714687Z DEBUG selectors::matching: Matching complex selector metadata for svg id=None    
2025-02-16T11:51:31.714695Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.714701Z DEBUG selectors::matching: Matching complex selector linearGradient for svg id=None    
2025-02-16T11:51:31.714706Z DEBUG selectors::matching: Matching complex selector radialGradient for svg id=None    
2025-02-16T11:51:31.714710Z DEBUG selectors::matching: Matching complex selector script for svg id=None    
2025-02-16T11:51:31.714716Z DEBUG selectors::matching: Matching complex selector style for svg id=None    
2025-02-16T11:51:31.714721Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.714726Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for svg id=None    
2025-02-16T11:51:31.714733Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for g id=None    
2025-02-16T11:51:31.714738Z DEBUG selectors::matching: Matching complex selector image for g id=None    
2025-02-16T11:51:31.714742Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.714745Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.714750Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.714755Z DEBUG selectors::matching: Matching complex selector defs for g id=None    
2025-02-16T11:51:31.714759Z DEBUG selectors::matching: Matching complex selector clipPath for g id=None    
2025-02-16T11:51:31.714764Z DEBUG selectors::matching: Matching complex selector mask for g id=None    
2025-02-16T11:51:31.714769Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.714773Z DEBUG selectors::matching: Matching complex selector desc for g id=None    
2025-02-16T11:51:31.714778Z DEBUG selectors::matching: Matching complex selector title for g id=None    
2025-02-16T11:51:31.714782Z DEBUG selectors::matching: Matching complex selector metadata for g id=None    
2025-02-16T11:51:31.714787Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.714792Z DEBUG selectors::matching: Matching complex selector linearGradient for g id=None    
2025-02-16T11:51:31.714796Z DEBUG selectors::matching: Matching complex selector radialGradient for g id=None    
2025-02-16T11:51:31.714801Z DEBUG selectors::matching: Matching complex selector script for g id=None    
2025-02-16T11:51:31.714806Z DEBUG selectors::matching: Matching complex selector style for g id=None    
2025-02-16T11:51:31.714810Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.714815Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for g id=None    
2025-02-16T11:51:31.714820Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for rect id=None    
2025-02-16T11:51:31.714825Z DEBUG selectors::matching: Matching complex selector image for rect id=None    
2025-02-16T11:51:31.714830Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.714834Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.714839Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.714844Z DEBUG selectors::matching: Matching complex selector defs for rect id=None    
2025-02-16T11:51:31.714848Z DEBUG selectors::matching: Matching complex selector clipPath for rect id=None    
2025-02-16T11:51:31.714853Z DEBUG selectors::matching: Matching complex selector mask for rect id=None    
2025-02-16T11:51:31.714858Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.714862Z DEBUG selectors::matching: Matching complex selector desc for rect id=None    
2025-02-16T11:51:31.714866Z DEBUG selectors::matching: Matching complex selector title for rect id=None    
2025-02-16T11:51:31.714872Z DEBUG selectors::matching: Matching complex selector metadata for rect id=None    
2025-02-16T11:51:31.714877Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.714882Z DEBUG selectors::matching: Matching complex selector linearGradient for rect id=None    
2025-02-16T11:51:31.714886Z DEBUG selectors::matching: Matching complex selector radialGradient for rect id=None    
2025-02-16T11:51:31.714891Z DEBUG selectors::matching: Matching complex selector script for rect id=None    
2025-02-16T11:51:31.714896Z DEBUG selectors::matching: Matching complex selector style for rect id=None    
2025-02-16T11:51:31.714900Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.714905Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for rect id=None    
2025-02-16T11:51:31.716680Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for svg id=None    
2025-02-16T11:51:31.716697Z DEBUG selectors::matching: Matching complex selector :root for svg id=None    
2025-02-16T11:51:31.716702Z DEBUG selectors::matching: Matching complex selector image for svg id=None    
2025-02-16T11:51:31.716706Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.716710Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.716714Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.716718Z DEBUG selectors::matching: Matching complex selector defs for svg id=None    
2025-02-16T11:51:31.716721Z DEBUG selectors::matching: Matching complex selector clipPath for svg id=None    
2025-02-16T11:51:31.716725Z DEBUG selectors::matching: Matching complex selector mask for svg id=None    
2025-02-16T11:51:31.716729Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.716733Z DEBUG selectors::matching: Matching complex selector desc for svg id=None    
2025-02-16T11:51:31.716737Z DEBUG selectors::matching: Matching complex selector title for svg id=None    
2025-02-16T11:51:31.716741Z DEBUG selectors::matching: Matching complex selector metadata for svg id=None    
2025-02-16T11:51:31.716747Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.716754Z DEBUG selectors::matching: Matching complex selector linearGradient for svg id=None    
2025-02-16T11:51:31.716758Z DEBUG selectors::matching: Matching complex selector radialGradient for svg id=None    
2025-02-16T11:51:31.716765Z DEBUG selectors::matching: Matching complex selector script for svg id=None    
2025-02-16T11:51:31.716770Z DEBUG selectors::matching: Matching complex selector style for svg id=None    
2025-02-16T11:51:31.716775Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.716780Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for svg id=None    
2025-02-16T11:51:31.716787Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for g id=None    
2025-02-16T11:51:31.716792Z DEBUG selectors::matching: Matching complex selector image for g id=None    
2025-02-16T11:51:31.716797Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.716801Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.716806Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.716811Z DEBUG selectors::matching: Matching complex selector defs for g id=None    
2025-02-16T11:51:31.716816Z DEBUG selectors::matching: Matching complex selector clipPath for g id=None    
2025-02-16T11:51:31.716820Z DEBUG selectors::matching: Matching complex selector mask for g id=None    
2025-02-16T11:51:31.716825Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.716828Z DEBUG selectors::matching: Matching complex selector desc for g id=None    
2025-02-16T11:51:31.716835Z DEBUG selectors::matching: Matching complex selector title for g id=None    
2025-02-16T11:51:31.716839Z DEBUG selectors::matching: Matching complex selector metadata for g id=None    
2025-02-16T11:51:31.716844Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.716848Z DEBUG selectors::matching: Matching complex selector linearGradient for g id=None    
2025-02-16T11:51:31.716853Z DEBUG selectors::matching: Matching complex selector radialGradient for g id=None    
2025-02-16T11:51:31.716858Z DEBUG selectors::matching: Matching complex selector script for g id=None    
2025-02-16T11:51:31.716862Z DEBUG selectors::matching: Matching complex selector style for g id=None    
2025-02-16T11:51:31.716867Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.716871Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for g id=None    
2025-02-16T11:51:31.716876Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for rect id=None    
2025-02-16T11:51:31.716881Z DEBUG selectors::matching: Matching complex selector image for rect id=None    
2025-02-16T11:51:31.716886Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.716890Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.716895Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.716900Z DEBUG selectors::matching: Matching complex selector defs for rect id=None    
2025-02-16T11:51:31.716904Z DEBUG selectors::matching: Matching complex selector clipPath for rect id=None    
2025-02-16T11:51:31.716909Z DEBUG selectors::matching: Matching complex selector mask for rect id=None    
2025-02-16T11:51:31.716913Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.716918Z DEBUG selectors::matching: Matching complex selector desc for rect id=None    
2025-02-16T11:51:31.716922Z DEBUG selectors::matching: Matching complex selector title for rect id=None    
2025-02-16T11:51:31.716927Z DEBUG selectors::matching: Matching complex selector metadata for rect id=None    
2025-02-16T11:51:31.716931Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.716936Z DEBUG selectors::matching: Matching complex selector linearGradient for rect id=None    
2025-02-16T11:51:31.716941Z DEBUG selectors::matching: Matching complex selector radialGradient for rect id=None    
2025-02-16T11:51:31.716945Z DEBUG selectors::matching: Matching complex selector script for rect id=None    
2025-02-16T11:51:31.716950Z DEBUG selectors::matching: Matching complex selector style for rect id=None    
2025-02-16T11:51:31.716954Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.716959Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for rect id=None    
2025-02-16T11:51:31.717628Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for svg id=None    
2025-02-16T11:51:31.717640Z DEBUG selectors::matching: Matching complex selector :root for svg id=None    
2025-02-16T11:51:31.717646Z DEBUG selectors::matching: Matching complex selector image for svg id=None    
2025-02-16T11:51:31.717651Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.717661Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.717666Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.717671Z DEBUG selectors::matching: Matching complex selector defs for svg id=None    
2025-02-16T11:51:31.717675Z DEBUG selectors::matching: Matching complex selector clipPath for svg id=None    
2025-02-16T11:51:31.717680Z DEBUG selectors::matching: Matching complex selector mask for svg id=None    
2025-02-16T11:51:31.717685Z DEBUG selectors::matching: Matching complex selector marker for svg id=None    
2025-02-16T11:51:31.717689Z DEBUG selectors::matching: Matching complex selector desc for svg id=None    
2025-02-16T11:51:31.717694Z DEBUG selectors::matching: Matching complex selector title for svg id=None    
2025-02-16T11:51:31.717699Z DEBUG selectors::matching: Matching complex selector metadata for svg id=None    
2025-02-16T11:51:31.717703Z DEBUG selectors::matching: Matching complex selector pattern for svg id=None    
2025-02-16T11:51:31.717708Z DEBUG selectors::matching: Matching complex selector linearGradient for svg id=None    
2025-02-16T11:51:31.717713Z DEBUG selectors::matching: Matching complex selector radialGradient for svg id=None    
2025-02-16T11:51:31.717717Z DEBUG selectors::matching: Matching complex selector script for svg id=None    
2025-02-16T11:51:31.717722Z DEBUG selectors::matching: Matching complex selector style for svg id=None    
2025-02-16T11:51:31.717726Z DEBUG selectors::matching: Matching complex selector symbol for svg id=None    
2025-02-16T11:51:31.717731Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for svg id=None    
2025-02-16T11:51:31.717737Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for g id=None    
2025-02-16T11:51:31.717742Z DEBUG selectors::matching: Matching complex selector image for g id=None    
2025-02-16T11:51:31.717747Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.717751Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.717756Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.717760Z DEBUG selectors::matching: Matching complex selector defs for g id=None    
2025-02-16T11:51:31.717765Z DEBUG selectors::matching: Matching complex selector clipPath for g id=None    
2025-02-16T11:51:31.717769Z DEBUG selectors::matching: Matching complex selector mask for g id=None    
2025-02-16T11:51:31.717774Z DEBUG selectors::matching: Matching complex selector marker for g id=None    
2025-02-16T11:51:31.717778Z DEBUG selectors::matching: Matching complex selector desc for g id=None    
2025-02-16T11:51:31.717783Z DEBUG selectors::matching: Matching complex selector title for g id=None    
2025-02-16T11:51:31.717788Z DEBUG selectors::matching: Matching complex selector metadata for g id=None    
2025-02-16T11:51:31.717792Z DEBUG selectors::matching: Matching complex selector pattern for g id=None    
2025-02-16T11:51:31.717797Z DEBUG selectors::matching: Matching complex selector linearGradient for g id=None    
2025-02-16T11:51:31.717801Z DEBUG selectors::matching: Matching complex selector radialGradient for g id=None    
2025-02-16T11:51:31.717806Z DEBUG selectors::matching: Matching complex selector script for g id=None    
2025-02-16T11:51:31.717810Z DEBUG selectors::matching: Matching complex selector style for g id=None    
2025-02-16T11:51:31.717815Z DEBUG selectors::matching: Matching complex selector symbol for g id=None    
2025-02-16T11:51:31.717819Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for g id=None    
2025-02-16T11:51:31.717825Z DEBUG selectors::matching: Matching complex selector :not(:root)svg for rect id=None    
2025-02-16T11:51:31.717829Z DEBUG selectors::matching: Matching complex selector image for rect id=None    
2025-02-16T11:51:31.717834Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.717838Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.717843Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.717847Z DEBUG selectors::matching: Matching complex selector defs for rect id=None    
2025-02-16T11:51:31.717852Z DEBUG selectors::matching: Matching complex selector clipPath for rect id=None    
2025-02-16T11:51:31.717857Z DEBUG selectors::matching: Matching complex selector mask for rect id=None    
2025-02-16T11:51:31.717861Z DEBUG selectors::matching: Matching complex selector marker for rect id=None    
2025-02-16T11:51:31.717866Z DEBUG selectors::matching: Matching complex selector desc for rect id=None    
2025-02-16T11:51:31.717870Z DEBUG selectors::matching: Matching complex selector title for rect id=None    
2025-02-16T11:51:31.717875Z DEBUG selectors::matching: Matching complex selector metadata for rect id=None    
2025-02-16T11:51:31.717879Z DEBUG selectors::matching: Matching complex selector pattern for rect id=None    
2025-02-16T11:51:31.717884Z DEBUG selectors::matching: Matching complex selector linearGradient for rect id=None    
2025-02-16T11:51:31.717889Z DEBUG selectors::matching: Matching complex selector radialGradient for rect id=None    
2025-02-16T11:51:31.717893Z DEBUG selectors::matching: Matching complex selector script for rect id=None    
2025-02-16T11:51:31.717898Z DEBUG selectors::matching: Matching complex selector style for rect id=None    
2025-02-16T11:51:31.717902Z DEBUG selectors::matching: Matching complex selector symbol for rect id=None    
2025-02-16T11:51:31.717908Z DEBUG selectors::matching: Matching complex selector :host(use) > symbol for rect id=None    
2025-02-16T11:51:31.729583Z DEBUG rnote_engine::store: State has not changed, no need to record.

(rnote:2): Gtk-CRITICAL **: 12:51:57.169: The layout manager of type GtkBoxLayout 0x56251b4320c0 does not create GtkLayoutChild instances

Desktop:

  • OS: OpenSUSE Tumbleweed
  • App Version: Rnote v0.11.0
  • Installation Source: Flatpak from Flathub
  • Desktop Environment: KDE Plasma 6
  • Display Server: Wayland
  • Input Source: Mouse and Keyboard, On-Screen-Tablet on a convertible
@mahdi4261
Copy link

You can change the save location like this:

Image

Also, you can give rnote permission to other file locations using Flatseal.

Image

@elouin
Copy link
Author

elouin commented Feb 17, 2025

Maybe i should adjust the title. My main issue isn't really that the default save location is set to /, but that it doesn't give an error when clicking on "Save" when an unwriteable path is selected. That way you lose what you just added to the newly created document.

Also, changing the permissions on the flatpak, wont change the fact that a normal user can't write to /.

@elouin elouin changed the title Default save location set to unwriteable / and no error is given when trying to save No error is given when trying to save to an unwriteable path Feb 17, 2025
@mahdi4261
Copy link

mahdi4261 commented Feb 17, 2025

You are right. I could reproduce the behavior. You should add "change workspace directory to root" in steps to reproduce the behavior. For other unwriteable paths than root, rnote does show error.

@elouin
Copy link
Author

elouin commented Feb 17, 2025

You should add "change workspace directory to root" in steps to reproduce the behavior.

I didn't change anything personally, thats why i didn't include it.

@Doublonmousse
Copy link
Collaborator

Maybe this happens because of permissions issue + the walkup function

pub(crate) fn path_walk_up_until_exists(path: impl AsRef<Path>) -> anyhow::Result<PathBuf> {
(fails to find a path until only / is left)

@flxzt flxzt added bug Something isn't working high prio This has high priority labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high prio This has high priority
Projects
None yet
Development

No branches or pull requests

4 participants