1
0
Fork 0
Commit Graph

228 Commits

Author SHA1 Message Date
Jocelyn Turcotte 12d7484b85 Pass SyncFileItems by pointer instead of by value
Use a QSharedPointer to keep the same ownership and
continue passing the SyncFileItems as a const& when
ownership isn't taken. This allows sharing the same
allocations between the jobs and the result vectors.

This saves about 20MB of memory (off 120MB) once all
jobs are created.
2015-04-18 14:26:40 +02:00
Olivier Goffart 458f336405 PropagateDownload: Read the mtime from the file system after writing it
Because file system like FAT only have two second accuracy and would result
in a upload if the mtime in the database is not the same as the one that was
downloaded

Issue #3103
2015-04-15 15:50:20 +02:00
Markus Goetz ef89582d7e Propagator: Fix compile 2015-03-30 08:41:53 +02:00
Markus Goetz 06a2f58c51 Propagator: Introduce custom property to make error soft
This can be set by a custom credential QNAM.
2015-03-17 23:31:30 +01:00
Christian Kamm efe9f1b442 Lnk: Work around QFile::rename() #2792
QFile::rename() fails if the source file is a shortcut to a file
or directory that does not exist.
2015-03-11 12:29:33 +01:00
Markus Goetz 668de9bf31 Propagate: Don't retry direct download on abort 2015-03-05 21:56:39 +01:00
Klaas Freitag 05624e3fc8 FileSystem: Remove QFileInfo based implementations.
QFileInfo has to be refreshed if the underlying file has been
modified in between. That is dangerous so ckamm and me decided
to eliminate the QFileInfo based implementations.

This was triggered by a bug that the client uploaded files that
it should not have.
2015-02-27 15:27:49 +01:00
Olivier Goffart d8b6e00fe7 Propagator: Let network propagator job understand a new header OC-ErrorString
This allows the server to send a readable error string in many cases
2015-02-26 15:53:09 +01:00
Christian Kamm f88398e776 lnk files: Fix exists() calls. #2792 2015-02-25 11:50:32 +01:00
Christian Kamm 9ba88f6baf Windows: Sync .lnk files correctly. #2792 2015-02-12 11:27:58 +01:00
Olivier Goffart 5ec793e045 propagateupload: Save the mtime given by the server in the reply to GET
There could be a race condition if the file was updated on the server
between the discovery and the propagate phase. By taking the mtime from
the server, we make sure that we do not have a race.

This is tested by t6.pl with BIG3.file because the script was modifying
the file between the two phases
2015-02-06 10:23:20 +01:00
Klaas Freitag 40c802b148 Download: Handle locking problems as soft errors, enterprise #455 2015-01-15 20:51:30 +01:00
Olivier Goffart 22ad34fa0e Merge branch '1.7'
Conflicts:
	admin/win/nsi/l10n/French.nsh
	src/mirall/propagator_qnam.cpp
2015-01-15 17:58:43 +01:00
Daniel Molkentin c3468b7ed6 Merge remote-tracking branch 'origin/master' into accountstate
Conflicts:
	src/gui/owncloudsetupwizard.cpp
	src/gui/owncloudsetupwizard.h
	src/libsync/propagatedownload.cpp
	src/libsync/propagatedownload.h
2015-01-08 15:33:39 +01:00
Christian Kamm 38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Olivier Goffart e8efaa5ed8 Direct download URL: Fix resuming
The server might support resuming, so don't always erase the temporary file
and pass the startSize, so the temporary file will be remove if the server
does not support it after all (because it is not sending the "bytes" header

Also pass the expected etag for consistency even if it's not used in this case.
2014-12-18 12:13:12 +01:00
Olivier Goffart 96872e2b3b Download: When direct URL don't work, retry through webdav 2014-12-17 14:28:13 +01:00
Olivier Goffart b1d392e415 Download job: allow redirect on direct download link
Issue #2614
2014-12-16 11:51:25 +01:00
Christian Kamm 53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Daniel Molkentin 3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart fb3f5d86cf Fix compilation after merge 2014-12-01 14:41:39 +01:00
Olivier Goffart 512492bf30 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/propagatedownload.cpp
2014-12-01 14:37:47 +01:00
Olivier Goffart 1c58b75ac2 Merge branch '1.7' 2014-11-21 11:08:20 +01:00
Christian Kamm 0fe7a69b39 FolderWatcher: Detect own changes. #2297 2014-11-20 13:16:29 +01:00
Olivier Goffart 1113980b20 Propagator: Change the scheduler
It still needs to be a bit optimized, but it allows to paralelized jobs between directories

(this is required to paralelize the mkcol)
2014-11-18 17:35:31 +01:00
Daniel Molkentin 281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Olivier Goffart 134650eb44 Parallel DELETE 2014-11-11 13:19:29 +01:00
Olivier Goffart 506ba022f1 Split propagator_qnam.cpp into propagateupload.cpp and propagatedownload.cpp 2014-11-11 12:17:10 +01:00