The server can respond with values like `2.58440798353E+12` instead of
a plain number like `2584407983530`.
`QVariant::toLongLong` does not recognise that as a valid number and
returns `0` instead, breaking the sync for some.
Also added a fallback value in case parsing the value as double doesn't
work either.
Fixes#8555
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Some tests (okay, just the RemoteWipeTest) check for the removal of the
local directory. However, QFileInfo will return `/` as the canonical
file path if the directory no longer exists, breaking some asserts ...
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Something changed in the file system layer between Qt 6.8 and Qt 6.9
that now results in temporary paths no longer be canonical by default
(i.e. `/private/var/folders/...` changed to `/var/folders/...`, which
confuses the unit tests).
See also: https://bugreports.qt.io/browse/QTBUG-140151
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
rename FileInfo::Etags to FileInfo::EtagsAction to avoid any future
possibility that we would want to use this name for something else
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>
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>
makes our fake server require an md5 custom checksum for bulk upload
until version 32.0.0
starting with 32.0.0 this custom checksum must be empty
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Files with a modification time of less than 0 do usually not make sense
(and afaik the server doesn't accept them either).
--> attempt to update the modification time to _Time.now_ while
propagating
side note: I ran into this because KArchive/Ark(?) didn't consider the
extra time attributes on entries for a certain zip file, so it instead
used the standard time value of each zip entry which was set to <= 1980
for files and < 1970 for directories...
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
clean up preprocessor directives for older macOS releases that are not
supported by macOS minimum required release from the Qt 6.8 release we
require
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
for now simple rule to guess if the server has windows naming enforced
if windows naming is enforced, we enforce it for new files
if not, we do not care
for now limited to spaces removal
more to come
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
why one would not update the modification time when modifying a remote
file during automated tests
there is no reason to not update the modification time as this is what
is done by the server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
introduce a new type of conflict for case clash filename conflicts
add proper handling including a new utility class to solve them and a
new dialog for the user to pick a fix
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
will prevent nextcloudcmd command line client from ignoring the settings
handled by SyncOptions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
fetch lock properties from server
decode them and store them in sync database
test to ensure we do properly handle those properties
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>