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
Olivier Goffart
d54e00488a
New Discovery algorithm
...
Some error handling. In particular for the case where there is a conflict
between files and directories.
SyncEngineTest and SyncMoveTest passes
2020-12-15 10:57:58 +01:00
Olivier Goffart
5a57a36729
New discovery algorithm: Local rename
2020-12-15 10:57:58 +01:00
Olivier Goffart
f9a9be59e6
New discovery algo: Remote move
...
TestSyncMove::testRemoteChangeInMovedFolder
2020-12-15 10:57:57 +01:00
Olivier Goffart
92ddc60900
Handle Encoding Problems
...
TestSyncEngine now passes
2020-12-15 10:57:57 +01:00
Olivier Goffart
501da58b10
Ignore Hidden Files
2020-12-15 10:57:57 +01:00
Olivier Goffart
e934f6b27b
New discovery algo
...
Make TestSyncEngine::testSelectiveSyncBug pass
2020-12-15 10:57:57 +01:00