backintime
backintime copied to clipboard
Add tooltip/explanation for color-highlighted "Exclude" entries in "SSH encrypted" mode
When in mode "SSH encrypted" some of the entries in the "Exclude" tab of the settings dialog or highlighted with blue background color. Happens only in this mode.
I would like to understand why this happens. Looking into the code (see below) it seems to depend if the exclude entries do have a specific form of wildcard pattern. I am not sure about the details because I don't know how encfs works here. But I would like to understand why this is important to the user. Why needs the user a colorized indication of it? Is it a bug that there is no further explanation to the users?
It happens in this part of the code: https://github.com/bit-team/backintime/blob/d583cf8a4b7de4271f897f07a94d0fbe07f9caff/qt/settingsdialog.py#L2030-L2033
and boils down to here: https://github.com/bit-team/backintime/blob/d583cf8a4b7de4271f897f07a94d0fbe07f9caff/common/tools.py#L1524-L1546
The function name patternHasNotEncryptableWildcard gives a hint what's going on.
In encfs, filenames are encrypted, too. A file called foo might be called BH4GwJuc when encrypted with encFS, but boo could become 9vblHFaK. A wildcard like ?oo would match both foo and boo, but no (logically derived) wildcard could possibly match both BH4GwJuc and 9vblHFaK.
So BiT is probably trying to tell the user: In this mode, I can't work with wildcards like that, because the filenames are not predictable when encrypted.
OK, I think I understand.
But the * is allowed when used for one or more complete path elements (folders), right?
Mhm... EncFS will be removed so I might keep the solution low. I would just add a tooltip to the listview widget indicating the reason for the colored entries.
But the
*is allowed when used for one or more complete path elements (folders), right?
Yes, if it's used in such a way that every file in the folder is excluded. Because then you can just encrypt the folder's name and exclude every file under it.
OK, I got it. I'll take it from here and will provide a solution after the planed Qt6 merge (depends on #1301, #1607). Note to me: Hints from Qt community about tooltips to listview entries.