helloSystem / Filer

A file manager that can also render the desktop
GNU General Public License v2.0
31 stars 9 forks source link

metadata: use mirror of read-only parts of filesystem #46

Closed ghost closed 3 years ago

ghost commented 3 years ago

When extended attributes can't be written to a path (due to lack of user permissions), they are now written to a mirror of the directory structure under ~/.config/filer-qt/default/metadata

Likewise, when reading an extended attribute, if the requested path is not writable, the mirrored structure under filer-metadata is checked.

https://github.com/helloSystem/hello/issues/79

Signed-off-by: Chris Moore chris@mooreonline.org

ghost commented 3 years ago

@probonopd updated to use the~/.config/filer-qt/default directory for metadata and the logic is now to check if writable (using access()) to determine whether to use the extended attributes of the actual directory or in the ~/.config/filer-qt/default/metadata tree

probonopd commented 3 years ago

Thanks @moochris. I think instead of QDir().homePath() + "/" + ".config/ we should use the native Qt way of determining this directory, QStandardPaths::writableLocation AppConfigLocation. Wdyt?

ghost commented 3 years ago

@probonopd yes, good point, forgot about these functions... I'll update 🙂

ghost commented 3 years ago

@probonopd - OK, fixed the config path

probonopd commented 3 years ago

Thanks @moochris. I think we should also begin a documentation page on Metadata in our Developer documentation at https://hellosystem.github.io/docs/...