1
0
Fork 0
Commit Graph

77 Commits

Author SHA1 Message Date
chylex d2e5094d13
Revert "Merge pull request #3057 from nextcloud/bugfix/vfs-windows-lnk-files-freeze-issue" 2022-02-07 01:17:05 +01:00
Matthieu Gallien 2ee26bbd59 fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:31:19 +02:00
Matthieu Gallien 7c68408ee1 only compile xattr virtual files backend for linux platform (not unices)
for a reason a mac os platform specific file is missing and before xattr
plugin was compiled only for linux

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:10:54 +02:00
Matthieu Gallien 8ad6f89fed bring back dynamic load of VFS plugins
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-08 08:11:17 +00:00
Matthieu Gallien c123edb173 address review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Matthieu Gallien 4016c2fab0 avoid error when doing hydration when data socket is closed too early
when data is received, if we close the socket they cannot be read

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Hannah von Reth e7e218d8e6 Improve the error message returned by updateMetadata
Also properly handle the case the the file can't be converted to a placeholder
as it is locked
2021-07-06 14:03:53 +00:00
Matthieu Gallien 746072e95d fix all usage of _com_error(cfExecuteresult).ErrorMessage()
_com_error(cfExecuteresult).ErrorMessage() calls should be translated to
QString before use with qDebug and related logging facilities

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-02 11:19:04 +02:00
Valdnet 3937595eef l10n: Spelling unification
Spelling unification in Transifex.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-06-17 12:18:00 +00:00
Felix Weilbach c799dbdd61 Cfapi: Make sure no data is transfered after cancellation
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-17 09:10:06 +00:00
Felix Weilbach a89a84ff14 Mark placeholder in sync after updating the placeholder
Fixes #3403 #3082 #3391

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-14 13:40:26 +00:00
allexzander bb55232e8e VFS freeze fix. Treat .sync-exclude.lst as a non-virtual file always.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-08 09:25:43 +00:00
Felix Weilbach 32b7e62359 Warn user if using e2ee and vfs together
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-18 11:50:18 +00:00
Felix Weilbach c3a2587a91 Remove unnecessary cfapi logging statements
For big files that can add a lot lines to the log files.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-12 08:49:13 +00:00
allexzander ef89256d39 VFS. Allow dehydartion of readonly files. Preserve 'readonly' flag when creating a placeholder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-06 06:17:36 +00:00
Matthieu Gallien 419bd93dea when files get hydrated indirectly through pinning, sets correct state
files that get downloaded not through an hydration request need to be
converted to placeholder

sets the expected state when converting them to placeholder files

 #3082

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 13:54:32 +02:00
Matthieu Gallien 929ae965ce prevent progress bar to appear after a download is finished with CfApi
when using Cloud Filter API with enabled VFS on Windows, a progress bar
stays visible for some time after hydration is completed. Not updating a
last time the progress bar prevents that.

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 13:54:32 +02:00
Matthieu Gallien 97d785f1bb fix errors when calling CfRegisterSyncRoot by setting more fields
sets a reasonable size of the StructSize members in the struct passed to
CfRegisterSyncRoot function

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 08:02:40 +00:00
allexzander cb8b6ccd9b Ignore *.lnk files on Windows.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander 13f4bb541d Treat .lnk files as normal files without hydrating them or creating a placeholder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander 3906ae0922 Another way to fix this.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander 0a33e99053 Create std::wstrings out of const wchar_t* so a copy is created every time.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-06 10:03:22 +03:00
allexzander 28771b25e3 Fix VFS CfAPI Syncroot Register Error.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-27 02:41:24 +02:00
allexzander ab128cc4aa Revert "Merge pull request #3042 from nextcloud/temp-fix-vfs-failure-wow6432"
This reverts commit cafa475398, reversing
changes made to 003e56f4e6.
2021-03-26 22:25:31 +02:00
allexzander 9d15334813 Temp fix for vfs failure.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-26 21:41:44 +02:00
allexzander 193e50311b Refresh Windows download dialog progress when hydrating a placeholder
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-24 14:09:06 +02:00
Felix Weilbach d78774f29e Check reading from journal was successful before remove placeholder
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-24 10:51:50 +00:00
Felix Weilbach 9bf5b5c7ba CFAPI: Handle cancelation of hydration requests
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-18 10:43:48 +00:00
allexzander 5f0344abb2 Fix warnings in CfApiWrapper.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
allexzander 3fde838bee Fix for Windows long path issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
Felix Weilbach 523f1bcadd VFS Windows: Fix download of large files
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-04 09:05:17 +01:00
Felix Weilbach 4d05979be5 Log error message from CFAPI
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-27 17:44:26 +00:00
Kevin Ottens ebfe51b7e7 Don't treat new folders in unpinned folders as files to dehydrate
This would only happen if the parent of the newly created folder would
be explicitly set to online only, hence why it went under the radar
previously.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 17:09:24 +00:00
Kevin Ottens 21035d48a6 Don't crash when the same request is filled twice
The OS might request the same file again if we take too much time to
fulfill a request. So in case it's queueing the same one again instead
of bailing out just fail the second one and let the first one finish
properly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00:00
Kevin Ottens d3c7218ee8 Be a bit more resilient with errors
In case we'd been to slow to fullfill or we're still processing a
cancelled request better not just crash. We still log the issue though.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00:00
Kevin Ottens 1aeb77c967
Add the XAttr backend prototype with its test suite
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens 2d8eb19ee5
Second attempt at fixing CfAPI wrapper build in Win32 mode
MSVC having so useless error messages it didn't quite point to the root
cause of the issue... it turns out that through the maze of macros
defined in the windows API, there's one which impacted the function
pointer definition of CfCloseHandle which would then not convert to
FileHandle::Deleter as expected. So I end up wrapping it in a lambda to
help... luckily this kind of lambdas decay into a simple function
pointer so there's likely no overhead it's just to coerce the compiler
into doing the right thing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-07 13:49:10 +01:00
Kevin Ottens 79a54d68ed
Revert "Fix CfAPI wrapper build in Win32 mode"
This reverts commit 3b3864296a.
2021-01-07 13:40:01 +01:00
Kevin Ottens 3b3864296a
Fix CfAPI wrapper build in Win32 mode
For some reason MSVC manages to deduce the right constructor in Win64
mode but not in Win32 mode. So let's be more explicit about what we
return.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-06 17:07:50 +01:00
Hannah von Reth aadda32633
Handle errors in convertToPlaceholder 2020-12-30 16:17:47 +01:00
Kevin Ottens 46a5bd6b25
Ensure we properly cancel hydration on server errors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:59 +01:00
Kevin Ottens 90fbb7d322
Implement callback between wrapper and vfs object for hydration requests
This comes with a test simulating an open request coming from another
process (although in our case it's really just a thread). The actual
hydration works as expected by cfapi, handling of encrypted files is for
now missing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens 7668c521c1
Split the CfAPI lower level code in a wrapper
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens 423780bf79
Add initial version of the CfApi backend
For now this implements only the logic necessary to get a test suite
equivalent to the TestSyncVirtualFiles one to pass. It doesn't (yet)
honor request to fetch files from the system.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens c57eff6fd8
Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Kevin Ottens 201dbd54db
Remove the plugin loader mechanism for VFS backends
We will have all the code in public anyway so it can just be compiled
in. Thus no need to go through the plugin loading dance. Replaced the
loading with factory functions. Kept mostly the same structure
otherwise.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Olivier Goffart 66f7b27121
VFS: Do not overwrite existing files by placeholder
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
2020-12-15 10:59:03 +01:00
Christian Kamm 4c4cbf0d97
Vfs: Lots of tests and corrections for suffix edge cases
Avoid or deal with problems that happen when suffixed files exist on the
server or suffix and non-suffixed files exist locally.

See #7350, #7261.
2020-12-15 10:59:02 +01:00
Hannah von Reth e5a36c3bc6
CMake VFS: Enable us to provided vfs plugins from an external directory 2020-12-15 10:58:57 +01:00
Christian Kamm 8a5a185752
Fix 'unused parameter name' warnings 2020-12-15 10:58:55 +01:00