Commit Graph

42 Commits

Author SHA1 Message Date
allexzander 289a641d74 VFS Windows: Display the sharing state and lock state in the 'Status' column of Windows Explorer
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-10-04 18:32:51 +02:00
James Horsley 1d7a2c06f6 Fix crash in cldapi.dll
Fixes #3349

Change placeholder functions to take QStrings instead of handles

Signed-off-by: James Horsley <jbhorsley@gmail.com>
2022-09-05 09:16:19 +02:00
alex-z 001deace2d Implement COM Dll for CfApi shell extensins. Implement Thumbnail Provider.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-07-29 19:26:53 +03:00
Matthieu Gallien 2a3059d779 ensure we do properly failed hydration jobs
report status when the job is in error at end of hydration request
instead of doing the opposite

properly set status in db when a file failed to hydrate (still a virtual
file not a real one)

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-04-03 16:12:42 +02:00
Matthieu Gallien 20a4ed6e7e use proper API to dehydrate a placeholder file
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-01-24 14:16:40 +00:00
rakekniven 961cea92ca l10n: Fixed grammar
Reported at Transifex.

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2022-01-12 15:55:56 +01:00
alex-z 1244e96681 Enforce VFS. Disable 'Make always available locally'.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-14 15:03:57 +02:00
Matthieu Gallien b1977dfb18 prevent injecting invalid modified time through CfApi calls
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-08 07:22:24 +00:00
Matthieu Gallien c53159cb0c fix random error when updating CfApi metadata
initialiazing all fields in a structure is required to not have random
behavior

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-29 18:04:00 +01:00
Matthieu Gallien 83a8058b51 improve logging for CfApi
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien a3013de6ea fix OCC::CfApiWrapper::handleForPath when path does not exist
sometime it can be called with a path that is already deleted

ensure we always go to the correct code path

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien 9eed62a854 remove too noisy log print
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien 43ec429fe4 improve logs when place holder info cannot be read
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-04 15:02:27 +01:00
Dmytro Korchynskyi 608fc5fb3a Fixed warnings by using static_cast
Signed-off-by: Dmytro Korchynskyi <kdl.dima@gmail.com>
2021-09-13 13:05:41 +03: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
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
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
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 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 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 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 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
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