we would automatically rename a file with an invalid name
do this if the newly discovered file is local and not if it is on the
server (which would fail because the local file does not exists at all)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
ensure we use currently existing server API to get the "no download"
permission
requires parsing some share-attributes new DAV property
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
in release builds we would happily try to remove an element from QList
with invalid index (-1) if the job is not found
avoid doing this in release builds and keep teh assert in debug builds
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
the sharing/activity button was supposed to be hidden, but a later
change forgot to adapt the variable used for querying the file metadata
so it never could determine the e2e-status
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
add a couple more info when receiving a reply to make it easier to link
the reply with the emitteed request
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
use the dedicated flag from CfApi to prevent self implicit hydration
requests
should ensure even more reliable handling of virtual files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
with virtual files we may wrongly try to access a file we just deleted
in which case an assert should ensure we capture this during automated
tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
in FilePermissionsRestore, first checks the folder permissions before
changing them
will avoid useless call changing permissions when not needed
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit implements enabling enableStrictTransportSecurityStore
and setStrictTransportSecurityEnabled in the AccessManager-
provided QNetworkAccessManager.
On first connection, this will make QNetworkAccessManager save the
HSTS status of the host in cache if it was enabled by the server.
On future connections, this setting is loaded and if the server
presents an invalid certificate and the HSTS hint is not expired, the
connection fails without showing the dreaded "Cannot connect securely
to ..." dialog.
Signed-off-by: François Guerraz <francois@orographic.uk>
Extra safeguard to ensure that the usage of
`FileSystem::setFolderPermissions` won't start a new sync run if
FolderWatcher/inotify detects a change in the file metadata...
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
On Linux changing the permissions causes inotify to create a IN_ATTRIB
event -- even if the permissions stays the same.
Such an event is passed to the filesystem watcher which lets the client
schedule a new sync run. In certain conditions, this could happen
during every sync run...
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
if Readable permissions is missing, do nto try to download the file
if a file was downlaoded but Readable permission is now missing, remove
it
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
we may not currently properly store certificate hash for encrypted items
and later fails to find which public or private key pairs to use
for now, it is better to remove it and ensure we have a reliable way to
handle certificate migration
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
QFileInfo::exists(filename) is the fastest method
alos avoid creating too many QFileInfo instances when we need it for
multiple purposes
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Earlier versions of Windows will render each character as a square when
DirectWrite is in use.
See also: #8064
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
if we did not query the server info, we have no quota info
so do not prevent upload because of no quota info available
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>