Commit graph

170 commits

Author SHA1 Message Date
Olivier Goffart
b83f6c0b3a sync engine: try to respect permission
This is still Work in progress
2014-06-17 14:44:58 +02:00
Olivier Goffart
2caa69e0cb blacklist: use the _ERROR instruction instead of _IGNORE
When something is in the blacklist, still use the _ERROR instruction
that way the applications can still report errors for blacklisted
items
2014-06-13 11:19:31 +02:00
Olivier Goffart
7a7b0e8939 propagator: Ignore new directory inside removed directory.
This fixes te bug if one create a tree of folders and subfolders
and delete them while they are uploading. Some folder would
reappears
2014-06-04 16:37:46 +02:00
Olivier Goffart
a4f6370774 propagator: do not update perent directory etag before sub directories are removed
Direcotries are removed at the end, and we don't want to update
parent directory etag before the delete is performed, or the next
sync may read from db and think the files are not removed.

Issue #1845
2014-06-04 12:31:30 +02:00
Daniel Molkentin
746c15b4aa Remove debug layout 2014-06-02 19:38:04 +02:00
Markus Goetz
022a3fcd92 OS X: Fix localFileNameClash
We need to compare the other way round and compare only the file name
because our sync directory might be symlinked and then resolve to
another canonical path (but we were only interested in the filename part
anyway)
2014-05-30 15:47:53 +02:00
Olivier Goffart
0151682a53 Make sure that OwncloudPropgator::finished is only emit once
When we abort, each job currently running may result in a call to finished().
It used to cause a crash because we would unlock the _syncMutex twice

Fixes #1793
2014-05-29 12:15:13 +02:00
Daniel Molkentin
3d2a2df86f Allow to set a smaller timeout value in the config file
Added to debug #1724
2014-05-28 16:28:22 +02:00
Klaas Freitag
181383e5f1 Check for case preserving file system in localCaseClash 2014-05-26 18:28:25 +02:00
Markus Goetz
c1b9d5c653 Propagator: Implement localFileNameClash for OS X 2014-05-26 17:36:52 +02:00
Olivier Goffart
5220786cf2 do not blacklist fatal error 2014-05-26 12:27:16 +02:00
Klaas Freitag
57359968ed Added method localFileNameClash
Also reordered the implementations a bit.
2014-05-23 18:58:08 +02:00
Olivier Goffart
1631cfdaf1 Fix not blacklisting error 5xx 2014-05-02 17:26:28 +02:00
Markus Goetz
6c44f53645 Set network timeout to 300 sec
As per previously used values (see source and changelog)
2014-05-02 15:35:40 +02:00
Olivier Goffart
988c162d2f Have only one place where we read the timeout 2014-05-02 13:04:53 +02:00
Olivier Goffart
983f9c5dde The job restore job need to be run with QMetaObject::invoke
Because the job might be in a different thread.
2014-04-29 16:58:24 +02:00
Olivier Goffart
f159b028b4 Add a compile option to not blacklist error code 5xx 2014-04-29 11:39:46 +02:00
Klaas Freitag
435e7e3eec HACK to avoid continuation: See task #1448
We do not know the _modtime from the server, at this point, so just set
the current one.  (rather than the one locally)
2014-04-04 10:56:33 +02:00
Markus Goetz
565bb540d6 Propagator: Add debug message regarding legacy vs QNAM 2014-04-03 16:37:40 +02:00
Olivier Goffart
607e48a68b let configure the default count of the blacklist 2014-04-01 13:54:47 +02:00
Olivier Goffart
3acdfc0004 Make configurable the maximum amount of job in parallel
Bia the environement variable OWNCLOUD_MAX_PARALLEL
2014-03-28 11:20:07 +01:00
Olivier Goffart
756e1c4a12 Prefer the use of _isDirectory over item._type == SyncFileItem::Directory 2014-03-20 16:42:42 +01:00
Olivier Goffart
c5f8a2555d Rename _dir to _direction
(to avoid confusion with directory)
2014-03-20 16:42:42 +01:00
Olivier Goffart
f05320c32c Clean the debug a bit 2014-03-17 12:15:16 +01:00
Olivier Goffart
aacc278583 Refactor the progress
Consider that there might be several files processed at the same time
2014-03-14 13:32:32 +01:00
Olivier Goffart
7cab77e879 Call the start method assyncroniously
That was my intention, which is why i did not do a direct call to start.

This should fix issue #1536
2014-03-06 21:01:08 +01:00
Olivier Goffart
feb49b2768 Saner defaults 2014-03-06 20:34:11 +01:00
Olivier Goffart
96c535d712 Make the parrallel uploaded also check for problem in Shared 2014-02-27 14:13:22 +01:00
Olivier Goffart
869793592d Merge branch '1.5'
Conflicts:
	VERSION.cmake
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-27 11:40:34 +01:00
Olivier Goffart
cd13144415 Fix adding a file in a Shared readonly directory
It should not create a conflict in that case.

Also when editing a file, create a conflict using the normal way,
after downloading the file and checking it is not the same
2014-02-21 10:53:09 +01:00
Klaas Freitag
82afb3b613 If a file in a read only share was edited, restore and create conflict.
This fixes bug #1448
2014-02-19 17:21:43 +01:00
Olivier Goffart
f5e16540a1 Merge branch '1.5'
Conflicts:
	src/mirall/owncloudpropagator.cpp
2014-02-19 15:38:03 +01:00
Olivier Goffart
e74f0f2854 Better support when user remove or rename the Shared directory 2014-02-19 15:23:36 +01:00
Olivier Goffart
a51f050a08 More fix for moving shared directories
Abort a directory job if the first job fails

Also make sure the jobs are in the directory job of their destination paths
2014-02-19 13:08:35 +01:00
Olivier Goffart
432f377750 Use the legacy jobs when using bandwidth limiting
Or if a environement variable is set
2014-02-18 12:24:35 +01:00
Olivier Goffart
c32beb957d Move the jobs around between files
Renamed owncloudpropagator_qnam  to propagator_qnam
Move the jobs in propagatorjobs.cpp
Move the neon jobs that have a qnam equivalent into propagator_legacy.cpp and
rename the jobs accordingly
2014-02-18 12:21:05 +01:00
Olivier Goffart
b35e38f80f Parallel download 2014-02-17 13:48:56 +01:00
Olivier Goffart
a4442ebb40 Merge branch 'master' into parallel_upload
Conflicts:
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-12 16:50:45 +01:00
Olivier Goffart
93f31fa9d7 Merge branch '1.5' 2014-02-12 16:44:24 +01:00
Olivier Goffart
f35b1f8a2b Only starts 6 jobs in parallel 2014-02-12 16:33:55 +01:00
Olivier Goffart
6db8daabf7 Make abort work even when there are parallel uploads 2014-02-12 16:33:55 +01:00
Olivier Goffart
a677f97b7f Fix removing and renaming directories from the Shared directory 2014-02-12 13:44:55 +01:00
Olivier Goffart
01c0a3c099 use Utility::sleep 2014-02-12 11:16:27 +01:00
Markus Goetz
8c9a65635f Propagator: Fix compilation
It is still protected on Qt4
2014-02-10 15:46:09 +01:00
Markus Goetz
79d14f0760 Propagator: Use cross platform sleep function 2014-02-10 14:34:48 +01:00
Olivier Goffart
bb378902ae Also force an update of the etag in case of renames
Imagine we have a file:
  foo/bar/moo
if we do     mv 'foo' 'foo2' and that we issue a MOVE on the server
and will update the entry 'foo' in the database with the new etag
If we write the etag of foo but not the etag of the sub item, when
we read from db on the next sync, we will miss them and beleive they
have been removed on the server
2014-02-06 17:56:27 +01:00
Olivier Goffart
8f1494f8f2 Report an error if fetching the etag fails
Very important in case of renames, else, if the server did not perform
the rename, we may end up deleting the files
2014-02-06 17:56:27 +01:00
Olivier Goffart
f67d2e6418 Start all the jobs in parallel 2014-02-06 12:11:45 +01:00
Olivier Goffart
9a6275a5e3 use QNAM for the PUT
Not yet supported:
 - chunking
 - if the file changes while uploading
 - aborting
 - owncloudcmd  (because of the dependency to the account and the credidentials)
2014-02-06 11:50:16 +01:00
Olivier Goffart
2d9c0b6c31 Move CSyncThread in the main thread, and just do the neon jobs in a thread
It is important because then we can do assynchronious job that needs
QNAM in the main thread
2014-02-05 20:18:03 +01:00