Camila Ayres
9257c1eb54
test(syncengine): add enum for Etags Validate/Invalidate.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
54facc929f
chore(quota): change log level and fix comment in test.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
4ad69d5945
refactor(quota): rename Quota struct to FolderQuota.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Camila Ayres
eb9ba35188
test(localdiscovery): add function for quota check from db when syncing.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-08-01 11:25:36 +02:00
Matthieu Gallien
acd27f1068
fix(sync): allow leading space file names on Windows
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-07 09:39:50 +02:00
Andy Scherzinger
48e53ea216
docs(reuse): Migrate to SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-05-07 23:06:34 +02:00
Matthieu Gallien
7ad3426eab
ensure correct behavioron Windows for invalid file names
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
4b176c21d4
try to enforce the windows compatibility as guessed from server
...
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>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
a39d6e85ec
enforce trailing and leading spaces for new files
...
enforce trailing and leading space rules for new files and only for new
files but on all platforms, not only windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:21:45 +01:00
Matthieu Gallien
f38c2b7f51
fix local discovery test for file names with spaces on windows
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Claudio Cambra
9406131e52
Add test for correct handling of live photo mov deletion
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-11-20 14:39:51 +01:00
Camila Ayres
1d9b6e2e79
Use preprocessor directives in tests.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-09-27 09:06:11 +02:00
Camila Ayres
2e750013be
Add test testCreateLocalPathsWithLeadingAndTrailingSpaces_syncOnSupportingOs.
...
- Fix discovery tests for files with invalid names.
- Now leading/trailing spaces trigger an error only on Windows.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-09-27 09:06:11 +02:00
Claudio Cambra
eee3a090cc
Provide Windows-compatible forbidden filename character in forbidden filenames test
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-08-21 09:51:39 +02:00
Claudio Cambra
071ab937af
Add test for new forbidden filename capabilities
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-08-21 09:51:39 +02:00
Matthieu Gallien
9ed87bf2ad
some files just cannot sync on windows: get automated tests to work
...
fix one automated test knowing the platform limitations of windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 17:48:58 +02:00
Matthieu Gallien
098f4ef164
better automated tests log
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:11 +02:00
Matthieu Gallien
96d1fc0720
temporarily ignore failed tests on windows
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:10 +02:00
alex-z
5574ddb744
Always discover blacklisted folders locally, to avoid data loss of non-uploaded files when modifying selectivesync list.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-02-23 10:58:57 +01:00
Matthieu Gallien
d371855e56
test that files soon to be expired will be synced automatically
...
try to ensure that we properly sync again files for which lock has
expired
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-11 16:01:58 +02:00
Claudio Cambra
ff5261eaf1
Check local file locked and unlocked correctly in testlocaldiscovery
...
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-04 11:52:23 +02:00
allexzander
5175d186a4
Do not ignore return values for SyncJournalDB in unit tests.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
alex-z
53654b2a50
Allow manual renaming of files and folders with spaces. Allow uploading invalid file name via the InvalidFileName dialog.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-05-16 18:07:26 +03:00
Matthieu Gallien
2ea68d75bd
add automated tests for LockFileJob to validate proper behavior
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
dc95f29165
fetch and store in sync database information abot lock state of files
...
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>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
908066072a
avoid deleting renamed file with spaces in name
...
ensure that normal sync engine will nto delete new file renamed due to
trailing/leading spaces in name
rename before upload in the same job to avoid having invalid state in
local desktop client database to ensure any subsequent run of the sync
engine will not make wrong decisions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-04-06 07:32:02 +00:00
Matthieu Gallien
d4081c99a7
prevent updating files when that would result in invalid mtime
...
ensure that we never try to sync a file with a sync that would result in
setting it up to an invalid mtime
test a recovery scenario with plain old sync folder and virtual files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
541447723a
remove all usage of QDateTime::toTime_t() to avoid overflow
...
QDateTime::toTime_t() can overflow if called with a date outside its
domain of working
this method is obsolete and QDateTime::toSecsSinceEpoch() is the
replacement
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
d0c2570b04
simplify sync folder in some automated local discovery tests
...
should be faster and easier to understand
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien
8decd475e5
clean transition when files with spaces exist already
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien
e89268bdd7
ensure we emit a rename command for renamed files
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:05 +00:00
Matthieu Gallien
6ceb45bac4
test files that should be renamed in sub-directory
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-07 11:35:38 +01:00
Felix Weilbach
df11424596
Trim trailing spaces before uploading files
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-10-14 11:22:59 +00:00
Olivier Goffart
62ec4c9330
Discovery: Handle the blacklistFiles from the server capabilities
...
Issue #434
Ideally one could add the blacklist to the exlucde reggexp, but this
is simpler
2020-12-15 10:58:30 +01:00
Olivier Goffart
7061f31887
Discovery: Fix downloading files when database is used for local discovery
...
This also fix the currently failling LockedFilesTest
2020-12-15 10:58:17 +01:00
Olivier Goffart
75f66ddaa1
Local discovery: always recurse within touched directory
...
If the file system watcher tells us a directory was modified, we should
recurse into it because it means it is probably a new directory
Issue #6804
2020-12-15 10:58:11 +01:00
Christian Kamm
765c12dae1
LocalDiscoveryTracker: Separate from Folder and move to libsync
...
To allow relevant code to be closer together and for testing in
unittests without having to get a gui Folder.
See #6120
2020-12-15 10:57:51 +01:00