filter new placeholder items by invalid modtime and only proceed with
creating only the valid ones
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Some callbacks do not contain a valid value for the `ProcessInfo` member
despite `CF_CONNECT_FLAG_REQUIRE_PROCESS_INFO` being set.
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
The `hydrationRequestReady` signal could be emitted before it was
connected to the event loop, resulting in the data transfer never being
started.
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
- Migrate vfs mode from config and load cfapi plugin for the folder.
- Move rename logic to Utility class.
Signed-off-by: Camila Ayres <hello@camilasan.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>
should make the existing log more useful when tracking the
self requested implicit hydration bugs
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
our current infrastructure will cause a deadlock for any hydration
requests coming from desktop files client itself
the main thread is responsible for executing the hydration request but
if the same thread is already blocked waiting for the hydration to
happen, both (open system call and hydration request handling) process
will never be completed and wait for each over in a stuck cycle
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
with those logs, hydrating is causing too much log to be written and
after some time (with big fixles), hydration is failing
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
some software (at least outlook native software) may fiddle with CfApi
placeholder metadta and set a .msg file to be out of sync state when
opening it
in that case, we will let the sync engine go over it and decide what to
do
it is then possible in that case that we would just put it back in "in
sync" state
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
acoid modifying some metadata of the placeholder when this placeholder
has just been uploaded to the server (will avoid truncating the
timestamps)
Close#6190
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Note that Windows may convert a placeholder file to a regular file when
it is replaced by another file, even if the old and new file (inode,
modified time, file size) are identical.
WIN32_FIND_DATA::dwReserved0 is only initialised in case of
FILE_ATTRIBUTE_REPARSE_POINT is set. This field is not a bit set. Check
corrected to only include all cloud reparse points and not other special
reparse points.
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
When replacing an OnlineOnly file by another one, the file maintains it
OnlineOnly pin state, but it is converted to a regular file. So, the
dehydration should convert the regular file to a (dehydrated)
placeholder instead of trying to update the (non-existing) placeholder.
Closes#4274
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
Setting PinState to Excluded ensures the syncing icon is not shown for ignored items.
If the PinState is not set to Excluded, also all parent directories are shown as being synced, which is very inconvenient for the end user as it seems that some folder are never fully synced by Nextcloud which isn't the case.
As long as .lnk files are not converted to placeholder files, also set them to Excluded to hide the syncing icon.
Closes#5524Closes#5594
Co-authored-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>