1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2025-09-06 14:53:12 +02:00

710 Commits

Author SHA1 Message Date
Hannah von Reth
82dbf8b5e1 VFS: remove now unused parameter 2020-12-15 10:59:16 +01:00
Hannah von Reth
4589772393 Remove more legacy C code 2020-12-15 10:59:15 +01:00
Hannah von Reth
3dcbc9fa66 Tests: Port check_vio_ext to Windows 2020-12-15 10:59:15 +01:00
Hannah von Reth
47dc7e6c49 Remove custome string functions 2020-12-15 10:59:15 +01:00
Hannah von Reth
f932dfc648 VFS: Tell the vfs plugin whether we have multiple accounts
This allows us to decide on the presentation of the account
2020-12-15 10:59:14 +01:00
Hannah von Reth
a0d81df21e UnitTests: Set a CookiesJar in FakeQNAM 2020-12-15 10:59:13 +01:00
Hannah von Reth
4d615c31da Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Hannah von Reth
86789a1280 Test: Disable parallelism to ensure serial execution 2020-12-15 10:59:10 +01:00
Olivier Goffart
317d3735d7 SocketAPI: fix status after a failure to move
Issue #7759
2020-12-15 10:59:09 +01:00
Hannah von Reth
734e49765d Test: Fix testMovedWithError for vfs mode 2020-12-15 10:59:09 +01:00
Hannah von Reth
85aefa4232 Sync: Fix handling of virtual files in error state
Issue: #7799
2020-12-15 10:59:09 +01:00
Hannah von Reth
7644be576f Test: Add test for vfs failed move crash 2020-12-15 10:59:09 +01:00
Olivier Goffart
a6a0e361c1 fixup test 2020-12-15 10:59:07 +01:00
Olivier Goffart
9f2c67dca9 Tests: add a couple of move tests
This was an attempt to reproduce #7722, but this actually does not
reproduce it
2020-12-15 10:59:07 +01:00
Hannah von Reth
9564e5e92e Fix saving of cookies
Fixes: #7700
2020-12-15 10:59:06 +01:00
Hannah von Reth
e08645f259 Remove old test scripts
Fixes: 7679
2020-12-15 10:59:05 +01:00
Olivier Goffart
0e7c56e81c Don't show the "All files deleted" popup when unselecting everything with selective sync
Issue #7337
2020-12-15 10:59:04 +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
Olivier Goffart
ca18bbc2ca Test: Fix testsyncvirtualfiles test
Like previous commit, the failure was caused by two conflicting commits
2020-12-15 10:59:02 +01:00
Olivier Goffart
ecd3de61f5 Fix build of tests.
Resulted from a conflict between two patches
2020-12-15 10:59:02 +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
Olivier Goffart
83d743b66b When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2020-12-15 10:59:01 +01:00
Olivier Goffart
cb38bb2b5e Fix Upload of large (> 2GiB) files
Issue #7506

This is a regression introduced by the delta sync feature (as the chunk offset
changed from being the chunk number to be the byte offset, it needs to be a
qint64 now)
2020-12-15 10:59:01 +01:00
Christian Kamm
ee3279c904 Tests: Fail if the initial sync fails 2020-12-15 10:59:01 +01:00
Olivier Goffart
390af4d41b Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2020-12-15 10:59:00 +01:00
Christian Kamm
89216daee6 Propagate dir: Never write the etag on remote mkdir #7481
It must always only be written once all children are successfully
propagated.
2020-12-15 10:59:00 +01:00
Christian Kamm
e91e1ca78f Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2020-12-15 10:59:00 +01:00
Markus Goetz
26b5e36351 Discovery: List local directories from thread #7456 #7439 2020-12-15 10:58:59 +01:00
Christian Kamm
28797baa39 Discovery: If a move is forbidden, restore the source
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.

For #7410
2020-12-15 10:58:58 +01:00
Christian Kamm
c9d1037622 Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2020-12-15 10:58:58 +01:00
Christian Kamm
c9dbe46542 Checksums: Fix crash due to threading issue
The checksum computation thread was potentially using a QFile that was
deleted in the gui thread.

For #7368
2020-12-15 10:58:54 +01:00
Christian Kamm
55ee3f440b Vfs: Remove old db record when dehydrating via rename
For #7338
2020-12-15 10:58:54 +01:00
Christian Kamm
00dcf3ef59 Vfs: Ensure pins change with (de-)hydration
Previously an implicit hydration of a file in an online-only folder
would not change the pin state and cause a dehydration on the next
sync.
2020-12-15 10:58:53 +01:00
Christian Kamm
5bc2180478 Vfs: Preserve pin state on hydration
For #7322 and #7323
2020-12-15 10:58:53 +01:00
Christian Kamm
eb58352286 Vfs: Make test pass with different suffix #7279 2020-12-15 10:58:52 +01:00
Christian Kamm
5acb157a7e VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.

To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.

This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
2020-12-15 10:58:52 +01:00
Christian Kamm
0e9f030b0f RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.

Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
2020-12-15 10:58:52 +01:00
Christian Kamm
fb47419e84 Vfs: Move pin state if files move #7250
Previously renames of items didn't carry the pin state with them.
2020-12-15 10:58:52 +01:00
Christian Kamm
34dc5e4e88 Vfs: Don't let new local files start out unpinned #7250
If one adds a new file to an online-only folder the previous behavior
was to upload the file in one sync and dehydrate it in the next. Now
these new files get set to Unspecified pin state, making them retain
their data.
2020-12-15 10:58:52 +01:00
Markus Goetz
62d876b09a OAuth2: Better error logging
This does not fix a bug, just was found while spotting a bug that was no bug.
For https://github.com/owncloud/enterprise/issues/2951
2020-12-15 10:58:51 +01:00
Christian Kamm
a7852e3aba Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.
2020-12-15 10:58:51 +01:00
Olivier Goffart
c335f69a65 Discovery: Do not abort the sync in case of error 404 (or 500)
Issue: #7199
2020-12-15 10:58:51 +01:00
Olivier Goffart
9f08636a4a SyncEngine: Fix renaming a single file cause the "delete all file" popup
Possibly a regression, since the new discovery discovers rist the renamed
files as removed

Issue #7204
2020-12-15 10:58:51 +01:00
Christian Kamm
b974f579ae Chunked upload: Fix percent encoding in If header #7176 2020-12-15 10:58:50 +01:00
Christian Kamm
9f3578b276 Tests: Fix DB locking issue in permissions test 2020-12-15 10:58:50 +01:00
Christian Kamm
a0457d5e1d Tests: fix vfs availability test case 2020-12-15 10:58:50 +01:00
Christian Kamm
7f3f13fd97 Vfs: "free space" only shows when it has an effect #7143
To do this, introduce AllDehydrated availability and rename
SomeDehydrated to Mixed - it now guarantees there are also hydrated
items.
2020-12-15 10:58:49 +01:00
Christian Kamm
021f994584 FolderWizard: Don't crash when typing invalid drive #7041
When the user typed "x:" where the drive x didn't exist, the validation
function would loop forever. Now it shows a "path doesn't exist" error.
2020-12-15 10:58:49 +01:00
Christian Kamm
fbe2dbf4ab Discovery: Query data-fingerprint on root item
Previously the property wasn't queried, meaning the fingerprint logic
couldn't get triggered.
2020-12-15 10:58:48 +01:00
Christian Kamm
c50f041c5b Discovery: 403 and 503 on root cause error
Previously these result codes during remote discovery of the sync root
would not cause an error and the discovery would get stuck.

Also extends RemoteDiscovery tests to check for errors on the root item.
2020-12-15 10:58:48 +01:00