1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-20 16:42:45 +02:00
Commit Graph

230 Commits

Author SHA1 Message Date
Klaas Freitag
e06e5fe55f Excludes: Fix unit tests for the new exclude load interface.
Also removed some commented lines.
2014-08-21 13:12:05 +02:00
Klaas Freitag
dc8f437b31 Excludes: Add an context free implementation of exclude file loading.
So that we are more thread safe.
2014-08-21 12:43:04 +02:00
Olivier Goffart
936252765a Merge branch 'master' into selective_sync
Conflicts:
	src/mirall/syncengine.cpp
	src/mirall/syncengine.h
2014-08-18 14:44:43 +02:00
Klaas Freitag
ddbe181e48 Update phase progress: Check if callback is defined. 2014-08-18 11:51:45 +02:00
Markus Goetz
64a7025522 CSync: Add a 30 second connect (not read) timeout 2014-08-15 15:54:13 +02:00
Markus Goetz
ce2741cebc SyncEngine & UI: Progress notifications for update phase
For each directory (local and remote, we have UI update throtting code)
a signal is emitted.
It is used by the settings dialog and the tray menu.
2014-08-15 15:28:35 +02:00
Olivier Goffart
c1831f4946 Selective sync: use a black list instead of a white list 2014-08-15 12:29:10 +02:00
Olivier Goffart
4b2c1bacd1 Merge remote-tracking branch 'origin/master' into selective_sync 2014-08-15 10:28:50 +02:00
Klaas Freitag
b09498d852 csync journal: Improve get_below_path query.
Add another index on the pathlen column. Use that column to deselect
all rows that are shorter than the path to search files below. That
shrinks the amount of rows to examine using LIKE tremendously by
a cheaply to query for criteria.
2014-08-14 13:52:44 +02:00
Klaas Freitag
8bc0d9acd3 Updater: Added a bit of useful logging. 2014-08-14 11:07:31 +02:00
Klaas Freitag
73325bcd41 csync statedb: Fixed handling of sqlite reply value. 2014-08-14 11:07:31 +02:00
Klaas Freitag
1b5bbfdad3 csync statedb: Set sqlite3_busy_timeout to 5 seconds. 2014-08-14 11:07:31 +02:00
Markus Goetz
4c0891a22e Tests: Give a more random name to test directories
Conflicts:
	csync/tests/ownCloud/ownCloud/Test.pm
2014-08-12 16:27:03 +02:00
Olivier Goffart
4ff0e7e0a2 Silent some warnings 2014-08-12 14:03:04 +02:00
Olivier Goffart
12459bf07e selective sync: fix whitelist matching 2014-08-12 11:43:42 +02:00
Olivier Goffart
7e009667a2 Selective sync: ignore the files that are not in the selective sync white list 2014-08-11 18:42:24 +02:00
Klaas Freitag
c3f8e099f4 tests: Never stumble over an already existing test share dir. 2014-08-07 15:45:17 +02:00
Klaas Freitag
e71ce01f90 tests: Some more tests with local files and shares. 2014-08-07 12:48:14 +02:00
Olivier Goffart
6827f9977c Merge branch 'il'
Conflicts:
	doc/ocdoc
2014-08-07 12:15:50 +02:00
Olivier Goffart
6d24bd0361 journaldb: Fix that fileid might be missing in the db
When recovering from a inalid move operation, we call
avoidReadFromDbOnNextSync. This will remove the fileid from the db so
we don't detect a move on the next sync.  But we want the next sync to fetch
the file id again, and this can only happen if we don't read them
from the db and do the actual PROPFIND, this is done by avoidReadFromDbOnNextSync

However, if there is propagation in that source directory later, it
will overide the invalid etag with the real one and we will not uissue the PROPFIND
to fetch the fileid.
We must therefore also protect the future write to the DB when calling
avoidReadFromDbOnNextSync
2014-08-07 12:14:45 +02:00
Markus Goetz
22c1629dd3 SyncEngine: Keep csync_journal with proper values for fileId and remotePerm
Before this patch, we had a lot of empty rows because we created
the SyncFileItems with the wrong(=local) data.
2014-08-07 10:14:14 +02:00
Klaas Freitag
fe2e4d87c5 tests: Fix t5: work with ownCloud 7 sharing. 2014-08-06 17:19:02 +02:00
Klaas Freitag
e9c4635f6b tests: Add another two seconds break, hope to make it work in virt. env.
Tests fail randomly on the CI computer which is virtualized. Maybe this
fix helps.
2014-08-06 11:34:35 +02:00
Olivier Goffart
f1ad82d0ba t2.pl Fix the test testing that moving a file that was just added do not create duplicate 2014-07-29 13:58:21 +02:00
Klaas Freitag
8d85516e72 tx.pl: Add a chunking update test, test for precondition failed. 2014-07-22 18:07:34 +02:00
Klaas Freitag
4dfe0fad7d tests: Big file chunking, change an existing big file to trigger update
This failed on oC7
2014-07-22 10:45:03 +02:00
Klaas Freitag
77e3480b2f csync oC Util: set field flag correctly to avoid etag memleak.
The fields varialbe should contain or'ed flags of the fields set
in the csync_vio_file_stat_t struct. The problem was that the field
for CSYNC_VIO_FILE_STAT_FIELDS_PERM was assigned rather than or'ed
which makes the release function for the struct not freeing the
etag memory => memleak.
2014-07-21 13:19:36 +02:00
Olivier Goffart
8a88ca6f34 Merge branch 'il'
Conflicts:
	src/mirall/propagator_legacy.h
2014-07-18 17:00:38 +02:00
Olivier Goffart
336e74b992 csync_owncloud: fix the name of the permissions property 2014-07-18 16:52:04 +02:00
Klaas Freitag
74b3e2ce3f tests: Another try to get around the jenkins test problem. 2014-07-18 12:20:14 +02:00
Klaas Freitag
2981b37219 Use file size of factor of four because of the createLocalFile algorithm 2014-07-17 10:29:13 +02:00
Klaas Freitag
2a5691e575 tests: Fix assertion. 2014-07-16 17:26:06 +02:00
Klaas Freitag
774432066e tests: Reverted previous change, do not append in createLocalFile() 2014-07-16 17:25:18 +02:00
Klaas Freitag
d5a8661480 tests: do not use system any more to modify files, rather perl native. 2014-07-16 14:06:57 +02:00
Klaas Freitag
9dacad99fa t1.pl: Change the corruption creation command. 2014-07-10 12:07:28 +02:00
Olivier Goffart
cbc7942a00 Added t8.pl that test case sensitivity issues
Made some change in the .cpp code in order to be able to test
the code when the file system is case sensitive
2014-07-09 22:44:08 +02:00
Olivier Goffart
9c3c4bac66 Merge remote-tracking branch 'origin/il' 2014-07-01 20:37:42 +02:00
Olivier Goffart
2f284209d8 Permissions: When moving is not allowed, fallback to delete and upload
We decided that we never want to rename a directory behind the
back of the user as the user may be using files in the directory
during the sync.
If moving is not allowed, we just erase the inode form the database so
the next sync will try to do an upload and delete and recover from there
using normal resolution.

This also add some code to update the inode back to the db when it is detected
as changed.
2014-06-27 15:30:08 +02:00
Olivier Goffart
9066ad5790 t7.pl: Test that deleting a directory restores it and all its sub directories 2014-06-27 11:31:35 +02:00
Olivier Goffart
62d0e670dc Add t7.pl Test for operation of files with restrictions 2014-06-27 11:22:53 +02:00
Olivier Goffart
21d7d8988a t1.pl: add a sleep to make sure the mtime of the files are different
It could be that the files are changed in the same second if the previous
sync was fast, and therefore the changes not detected.
2014-06-26 13:11:47 +02:00
Olivier Goffart
fbadadc377 propagator: Fix folder duplication if the folder is renamed on the server while uploading
While uploading a new folder, if the folder is renamed on the server
when still uploading, the result will be that the files that are already
uploaded will end up in the new filder name, but the file that were
not still are in the old folder.

After renaming, all the new uploads wil fail with an error on this sync
because the parent directory don't exist.
But they were uploaded with the old name in the next sync because
the renaming was not detected because the file id was not in the DB

Fix the problem by fetching the file id always when creating a new
directory, on the next sync, and saving it in the database ummediatly

https://github.com/owncloud/enterprise/issues/191
2014-06-24 12:00:13 +02:00
Olivier Goffart
8de3bda0b1 csync_update: update the permission in the db when they change
The current code only update the permissions in the DB when
the permission becomes non-empty.
Now we update the permission each time they change.

That way the code is the same for file id and permission so it is
simpler.
2014-06-24 11:10:50 +02:00
Olivier Goffart
9c0a21a5fb Permission: keep a space if the permission is empty
To distinguish no permission present to nothing is allowed.
That was the intention of the old code but it did not work as
the first if was always taken
2014-06-24 10:52:42 +02:00
Olivier Goffart
02704cdf74 Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
	csync/src/csync_statedb.c
	src/mirall/syncengine.cpp
	src/mirall/syncfileitem.h
2014-06-23 12:48:34 +02:00
Klaas Freitag
041066a252 Exclude: Add a missing free in case of empty lines.
This fixes Coverity CLT 12893
2014-06-20 15:15:35 +02:00
Olivier Goffart
b29a757b18 Revert "csync file util: Remove compare file function, not needed anymore."
This break the test.
And the function is aleady gone in master anyway

This reverts commit 407b3bebfe.
2014-06-20 14:29:43 +02:00
Klaas Freitag
db3d2eed5f csync core: Remove logically dead code: Can never be reached.
This fixes Coverity CID 12881
2014-06-20 13:08:03 +02:00
Olivier Goffart
b34afa1afc reconcile: use the proper enum type
thankfully the value hapenned to be the same, but the type
is of CSYNC_FTW_..  and not CSYNC_VIO_FILE_TYPE
Detected by coverity (CID 12887)
2014-06-20 11:51:07 +02:00
Olivier Goffart
b7c9fa6d5f csync_owncloud: silent CID 12883 2014-06-20 11:51:07 +02:00