1
0
Fork 0
Commit Graph

216 Commits

Author SHA1 Message Date
Hannah von Reth 98655ef28b Fix warning by using qsizetype instead of size_t
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-06 07:35:59 +00:00
Matthieu Gallien 20357ca7fa Revert "Add CMake option to enable address sanitizers"
This reverts commit 3000e26640.

This was not intended for a direct push

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-19 17:54:09 +02:00
Felix Weilbach 3000e26640 Add CMake option to enable address sanitizers
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-19 15:38:59 +02:00
Felix Weilbach da1e5c448a CMake: Use own SQLite3 on macOS and Windows
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-15 08:51:06 +02:00
allexzander 82953d0601 Fix review comments.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander 3fde838bee Fix for Windows long path issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
allexzander 3d266b9246 Win tests compilation fix. For Windows, the build was failing because of not being able to locate #include <sqlite3.h> in tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-03 13:52:10 +02:00
Nicolas Fella ab064c92b6 Fix build against Qt 5.15.3
Use QLatin1Char to prevent build error due to stricter QT_NO_CAST_FROM_ASCII

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-01-25 08:19:49 +00:00
Kevin Ottens 6e51dcf9c6
Provide the path to the current folder to statTypeVirtualFile on unix
Otherwise backends can't get to the actual file which will be needed for
the XAttr backend.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens 0756497c3e
Get the excluded files test to pass again on Windows
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +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
Hannah von Reth 4e373ca7ff
Remove now unneeded cmake test and define 2020-12-15 11:01:52 +01:00
Hannah von Reth ebd8047cb6
Replace custome date parser QDateTime::fromString(value, Qt::RFC2822Date) 2020-12-15 11:01:52 +01:00
Kevin Ottens 2cf76bbcbf
Repair the Windows Build
We now enforce the use of QStringLiteral and friends in some places,
but that feel through the cracks for some of the Windows specific code.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Hannah von Reth f220151527
Remove the use of goto from src/csync/csync_exclude.cpp 2020-12-15 10:59:19 +01:00
Hannah von Reth 563b347567
csync: apply strict QString handling 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 1a1035d516
Remove unused struct 2020-12-15 10:59:11 +01:00
Hannah von Reth a1d8010eae
Cleanup moc_csync.cpp include 2020-12-15 10:59:11 +01:00
Hannah von Reth 4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Hannah von Reth 8cbdb4451b
Remove now unneede csync_instruction_str 2020-12-15 10:59:10 +01:00
Hannah von Reth caa04f6adb
Make bit flags better readable 2020-12-15 10:59:10 +01:00
Hannah von Reth a9728b527a
Remove unused defines 2020-12-15 10:59:08 +01:00
Hannah von Reth 1dd01477c5
Use Q_ENUM_NS to pretty print csync enums 2020-12-15 10:59:07 +01:00
Christian Kamm 590db28541
Vfs: Clear up relationship between _type and pin state
The pin state is a per-item attribute that has an effect on _type:
AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly
hydrated files will be marked for dehydration.

Where exactly this effect materializes depends on how the pin states are
stored. If they're stored in the db (suffix) the dbEntry._type is
changed during the discovery.

If the pin state is stored in the filesystem, the localEntry._type must
be adjusted by the plugin's stat callback.

This patch makes pin states behave more consistently between plugins.
Previously with suffix-vfs pin states only had an effect on new remote
files. Now the effect of pinning or unpinning files or directories is as
documented and similar to other plugins.
2020-12-15 10:58:46 +01:00
Christian Kamm 575935ded0
Windows: Forbid chars 0-31 in filenames #6987 2020-12-15 10:58:42 +01:00
Christian Kamm 5820ac8b41
Discovery: Files can have dehydrate/download actions
This will be used in conjunction with vfs plugins that detect whether a
file has a pending hydration/dehydration through independent means and
communicate that to the discovery through local file type.
2020-12-15 10:58:38 +01:00
Christian Kamm 1cc41427fc
Build fix for mingw64 7.3 (Qt 5.12.0) 2020-12-15 10:58:37 +01:00
Dominik Schmidt 539cef345e
Switch to standard opt-out BUILD_TESTING instead of opt-in UNIT_TESTING
Compare https://cmake.org/cmake/help/v3.0/module/CTest.html
Craft automatically handles BUILD_TESTING, so we don't need to handle it
in our own blueprint.
2020-12-15 10:58:36 +01: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 6da96cd026
Port the exclude test to the QTest Framework
This is just a port to QtTest, I did not change the layout of the test.
I did search and replace to replace the assert with QCOMPARE/QVERIFY
I still call setup and setup_init like before (only explicitly, now)

Also ported the preformence tests to QBENCHMAK because windows don't have
gettimeofday.

Relates #6358
2020-12-15 10:58:29 +01:00
Christian Kamm b30f79edf6
vfs: Ensure SyncOptions::_vfs is never null
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
2020-12-15 10:58:26 +01:00
Christian Kamm 5b26b739f0
vfs: Document ignored return value. 2020-12-15 10:58:25 +01:00
Christian Kamm 0f2ef42ba2
Fixes after rebase to master
- use vfs suffix in ProcessDirectoryJob
- fix include vfs.h
- fix local vio passing vfs
- fix checksum computation
- vfs mode use
- mingw lambda compile issue
2020-12-15 10:58:21 +01:00
Christian Kamm 2b20985875
winvfs: initial work
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Kevin Ottens cce3d6f6fc
Excludes: switch all the path handling to QString
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:58:20 +01:00
Olivier Goffart 1c443ad021
CMakeLists.txt: increment sqlite version
3.9 is required for custom index to work
2020-12-15 10:58:20 +01:00
Olivier Goffart 5e05b61d2f
csync_vio_locale: use QString for the path in opendir
So we don't have to convert to utf8 and back again
2020-12-15 10:58:20 +01:00
Olivier Goffart f0c24cb6f9
Remove csync_misc: The code no longer use fnmatch 2020-12-15 10:58:20 +01:00
Olivier Goffart 3c3619f99a
Exclude: do everything with QString wiuthout converting to char* 2020-12-15 10:58:19 +01:00
Olivier Goffart 0eaa950e9e
Remove csync.cpp: It's only dead code 2020-12-15 10:58:17 +01:00
Christian Kamm 4f6f706f40
Excludes: drop csyncTraversalMatchFun()
The new discovery can call the traversal match function directly.
2020-12-15 10:58:13 +01:00
Olivier Goffart a4e139969c
Fix windows build 2020-12-15 10:58:12 +01:00
Olivier Goffart d81ccbb0c1
Checksum: Add support for SHA256 and SHA3
In case, some day, the server also supports it
2020-12-15 10:58:05 +01:00
Olivier Goffart 198b65e9fc
Fix a compilation error on windows 2020-12-15 10:58:05 +01:00
Olivier Goffart ca32eb1cf7
More cleanup of csync remains 2020-12-15 10:58:01 +01:00
Olivier Goffart 0a6d2d0f46
Remove csync_update and csync_reconcile
I guess some other csync utilities can also be remove dnow but
that will be for later
2020-12-15 10:58:00 +01:00
Olivier Goffart 57068b0fd9
New Discovery Algorithm: handle server errors 2020-12-15 10:58:00 +01:00