Commit graph

186 commits

Author SHA1 Message Date
Christian Kamm
9bd7ffe952 blacklist: Fix stale blacklist removal. #2247
Use the right check to determine whether a file has a blacklist entry,
SyncFileItem::FileIgnored was incorrect because that denotes files from
the ignore list or blacklisted files with no retries left.

The blacklistedInDb flag does the right thing. Rename it to
hasBlacklistEntry to be more explicit.
2014-10-08 09:17:40 +02:00
Daniel Molkentin
961df010cb Propagator: Fix typo in Win32-only code 2014-10-06 15:39:49 +02:00
Klaas Freitag
12b09fab67 CaseClash: more defensive logging on Windows. 2014-10-03 11:54:32 +02:00
Klaas Freitag
41fa562dce blacklisting: disable broken remove stale entries function for now. 2014-10-03 11:35:18 +02:00
Klaas Freitag
8ba08d7e87 Activity View: honor error string even if no warning
that allows to specify a more specific user message to be displayed.
2014-09-25 15:03:54 +02:00
Olivier Goffart
79052ba7c6 Blacklist: ignore problems that don't have HTTP error code and are possibly problem on the local file system
Issue #1985
2014-09-12 14:13:04 +02:00
Olivier Goffart
a84b7dc27e Restart the sync when we detect we need to redo a sync
Fixes #1968
Relates #2038
2014-09-10 17:27:33 +02:00
Christian Kamm
5d36a27893 Clean up stale journal entries and temporaries. #2057
* Downloadinfo entries for files that no longer need to be downloaded
  are useless and can be removed. In particular, the temporary files
  holding partially retrieved files are now deleted when no longer
  necessary.
* The same is true for blacklist entries for paths that are no longer
  being discovered.
* Same for uploadinfos for files that no longer need to be uploaded.
2014-09-04 13:14:15 +02:00
Klaas Freitag
617887a0c6 Propagator: If the sync was interrupted by pausing, do not show error.
Handle problems which happen because of pausing the sync as soft errors
rather than normal errors which are blacklisted and displayed in the
gui.

This fixes bug #1959
2014-08-19 14:21:59 +02:00
Olivier Goffart
6827f9977c Merge branch 'il'
Conflicts:
	doc/ocdoc
2014-08-07 12:15:50 +02:00
Markus Goetz
f004d5085d Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
2014-07-25 12:37:27 +02:00
Klaas Freitag
d4de024f15 Propagator: Fix local file name clash detection.
Need to normalize the output of QFileInfo::canonicalFilePath() before
comparing to a server side path.
See https://bugreports.qt-project.org/browse/QTBUG-39622

This fixes #1998 and #1999
2014-07-23 17:56:46 +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
09881040a3 Permissions: fix restoring subdirectories
The sync item vector must be sorted before we call checkForPermission
2014-06-27 13:34:15 +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
68c902e60b propagator: Fix restoring directory
If the result of a restored directory is SoftError, this prevent
to sync the rest of the directory

Therefore, we introduced a new status Restored,  which means that
the job was a success, but is a restoration and therefore should be
seen as a warning
2014-06-23 13:56:17 +02:00
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