1
0
Fork 0
Commit Graph

228 Commits

Author SHA1 Message Date
Jocelyn Turcotte 6f46764daa SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-09-26 11:03:23 +02:00
Olivier Goffart 95d23b1914 RemotePermissions: Store in a class rather than in a QByteArray to save memory
Create a specific type that parses the permissions so we can store
it in a short rather than in a QByteArray

Note: in RemotePermissions::toString, we make sure the string is not
empty by adding a space, this was already existing before commit
e8f7adc7ca where it was removed by mistake.
2017-09-22 09:29:08 +02:00
Olivier Goffart ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Jocelyn Turcotte 5fbed0d1cd Reverse the dependency between SyncJournalFileRecord and SyncFileItem
This will allow us to also use the SyncJournalDB in csync.
2017-09-18 14:00:52 +02:00
Jocelyn Turcotte 0e97770c47 Remove SyncFileItem::log
This remove the remaining "other" fields of the sync log to save a
bit of memory.

other_etag and other_fileId don't give much information to the users
and other_instruction will always be INST_NONE anyway.

other_modtime and other_size are kept since they are sometimes used.
They were renamed to have a bit more meaningful name.

SyncEngine::checkPermissions will now fetch its information from the
csync trees since they are now preserved until right after this point.

Fixes #3213
2017-09-18 11:46:09 +02:00
Christian Kamm 0c99673581 Make DetailError different from BlacklistedError
It's quite different in regard to blacklist handling and overall
sync failure changes.
2017-09-15 09:27:07 +02:00
Jocelyn Turcotte cf15cbf0b3 Move Utility to a new common static library
Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.

This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.
2017-09-05 17:25:19 +02:00
Olivier Goffart 520923b5a7 HTTP/2 Support
We need Qt 5.9 for HTTP2 because, even if Qt 5.8 already has support
for it, there is some critical bug in the HTTP2 implementation which
make it unusable [ https://codereview.qt-project.org/186050 and
https://codereview.qt-project.org/186066 ]

When using HTTP2, we can use many more parallel network request, this
is especially good for small file handling

Lower the priority of the GET and PUT propagation jobs, so the quota
or selective sync ui PROPFIND will not be blocked by them
2017-07-17 08:20:17 +02:00
Christian Kamm 5ca743dd25 SyncEngine: Introduce overall errors that are not tied to a file #5746
For now we use them for:
* csync errors: This allows them to appear in the sync issues tab
* insufficient local disk space, as a summary of individual file errors

Insufficient remote space will use them too, as might other issues that
are bigger than a single sync item.
2017-07-12 09:04:27 +02:00
Christian Kamm 8160963110 Compare the hash of files with identical mtime/size #5589
* For conflicts where mtime and size are identical:

  a) If there's no remote checksum, skip (unchanged)
  b) If there's a remote checksum that's a useful hash, create a
     PropagateDownload job and compute the local hash. If the hashes
     are identical, don't download the file and just update metadata.

* Avoid exposing the existence of checksumTypeId beyond the database
  layer. This makes handling checksums easier in general because they
  can usually be treated as a single blob.

  This change was prompted by the difficulty of producing file_stat_t
  entries uniformly from PROPFINDs and the database.
2017-06-15 13:54:16 +02:00
Christian Kamm aeeb408c74 Merge branch '2.3' 2017-06-08 13:02:34 +02:00
Christian Kamm 577a2715bd Download: Retrigger folder discovery on 404
See owncloud/enterprise#1966

If the server and the client's database go out of sync, there could be
persistent 404 errors. This change ensures that the problem corrects
itself eventually by triggering a remote discovery of the file's
parent folders.

It does not address the root cause that might have lead to the
divergence.
2017-05-29 21:41:10 +02:00
Christian Kamm c8d0f788e0 Apply clang-format 2017-05-17 12:26:27 +02:00
Jocelyn Turcotte b7553d5bdf Upgrade some qCDebug to qCInfo or qCWarning
Use qCInfo for anything that has general value for support and
development. Use qCWarning for any recoverable error and qCCritical
for anything that could result in data loss or would identify a serious
issue with the code.

Issue #5647
2017-05-11 17:22:59 +02:00
Jocelyn Turcotte 4ad190a558 Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.

Issue #5647
2017-05-11 17:22:59 +02:00
Christian Kamm 2598579d84 Switch JsonApiJob to Qt5's QJson #5710 2017-05-08 11:50:33 +02:00
Christian Kamm aff8008baf Downloads: Remove empty temporary if disk space full #5746 2017-05-04 15:12:14 +02:00
Olivier Goffart 1ed4eb46f2 Merge remote-tracking branch 'origin/2.3'
Conflicts:
	VERSION.cmake
2017-04-13 10:19:35 +02:00
Christian Kamm 35af03b2e5 Improve http error messages; cleanup
By default QNetworkReply::errorString() often produces messages like
   "Error downloading <url> - server replied: <reason>"
but the "downloading" part invariably confuses people since the
error might very well have been produced by a PUT request.

This commit produces clearer error messages for HTTP errors.

Additionally:
* Remove some unnecessary null checks from slots connected to
  network job signals and document that these signals never send
  null replies.
* There was a bug where AbstractNetworkJob::_timedout wasn't
  set when derived classes overrode slotTimeout. We now ensure
  it's always set by disallowing overrides of slotTimeout.
  Instead it now calls onTimedOut, which allows custom handling.
* Several subclasses declared errorString, isTimedOut. Move
  these to AbstractNetworkJob.
* Unify handling of OC-ErrorString (via the new, general
  Job::errorString)
* Add documentation in various places.
2017-04-04 09:27:37 +02:00
Olivier Goffart 039ff0ca8e PropagateDownload: fix possible crash
Backtrace looks like this:
Crash: EXCEPTION_ACCESS_VIOLATION_READ at 0x0
  File "propagatedownload.cpp", line 234, in OCC::GETFileJob::slotReadyRead
  File "moc_propagatedownl_CA5CFSHZDTX34X.cpp", line 86, in OCC::GETFileJob::qt_static_metacall
  File "qobject.cpp", line 495, in QMetaCallEvent::placeMetaCall
  File "qobject.cpp", line 1256, in QObject::event
  File "qapplication.cpp", line 3804, in QApplicationPrivate::notify_helper

GETFileJob::slotReadyRead can be called with a QueuedConnection when the
bendwith manager is involved. In that case, if the QNAM was reset
in between, the reply might have been destroyed.
(This is only speculation based on the backtrace)
2017-03-28 18:04:19 +02:00
Olivier Goffart 574435687d Merge remote-tracking branch 'origin/2.3'
Conflicts:
	src/libsync/owncloudpropagator.cpp
2017-03-16 13:51:53 +01:00
Christian Kamm b98876e265 Account server version: Helper to create versions
Hex literals don't work well with version 10: 0x100000 doesn't do
the right thing.
2017-03-15 16:30:08 +01:00
Olivier Goffart 0e8f0481d4 Merge remote-tracking branch 'origin/2.3'
Conflicts:
	src/libsync/owncloudpropagator.cpp
2017-03-09 09:54:14 +01:00
Christian Kamm 4a1a5fa076 AbstractNetworkJob: Improve redirect handling #5555
* For requests:
  - reuse the original QNetworkRequest, so headers and attributes
    are the same as in the original request
  - determine the original http method from the reply and the request
    attributes
  - keep the original request body around such that it can be sent
    again in case the request is redirected

* Simplify the interface that is used for creating new requests in
  AbstractNetworkJob.
2017-03-07 13:18:01 +01:00
Jocelyn Turcotte 19bf5e2ff1 Reduce the connection data used by PropagateDirectory objects
Avoid using connections to report up the job tree for signals
that we can directly communicate to the OwncloudPropagator.
This slightly reduces the memory usage and avoid passing those calls
through the whole parent chain.
2017-02-23 17:54:33 +01:00
Christian Kamm 4c1fdf1dee Double check usage of asserts #5429
A few are supposed to be fatal.
2017-02-08 15:15:19 +01:00
Jocelyn Turcotte 9db23d4df1 Remove SyncFileItem::_requestDuration #5456
This will save a QElapsedTimer in each job that was used only for
.owncloudsync.log (for which the request duration doesn't bring much
value).
2017-01-26 17:13:54 +01:00
Christian Kamm 29b39acfbe PropagatorJob: Access propagator through function #5453 2017-01-17 14:47:38 +01:00
Olivier Goffart ac95844ebd Propagator: make sure every network job has a parent
This could make sure that the network job gets deleted if the parent job gets
deleted, and would avoid crashes like:

Crash: EXCEPTION_ACCESS_VIOLATION_READ at 0xffffffff8b008a04
  File "qiodevice.cpp", line 1617, in QIODevice::errorString
  File "propagatedownload.cpp", line 264, in OCC::GETFileJob::slotReadyRead
  File "moc_propagatedownload.cpp", line 85, in OCC::GETFileJob::qt_static_metacall
  File "qobject.cpp", line 3716, in QMetaObject::activate
  File "moc_qiodevice.cpp", line 154, in QIODevice::readyRead
  File "qnetworkreplyhttpimpl.cpp", line 1045, in QNetworkReplyHttpImplPrivate::replyDownloadData

(#5329)
2016-12-14 14:13:47 +01:00
Christian Kamm f1f27221a7 Conflicts: Use the local mtime for the conflict file name #5273
Otherwise local conflict files may be overridden in a restore
situation. See ticket for details.
2016-11-08 14:47:51 +01:00
Christian Kamm 598a7cec5d Merge remote-tracking branch 'origin/2.2' 2016-09-28 12:07:45 +02:00
Jocelyn Turcotte 2b274e9460 Fix the MSVC build
- Replace functions that are provided by MinGW with a Win32-based
  implementation
- Explicitly export needed symbols from ocsync.dll
- Rename share.h to sharemanager.h since the name clashes with one
  of the Windows headers and get included from there
- Remove the timestamp from the fallback csync stderr logging, it's
  not used since we always provide a log callback
2016-09-16 17:43:39 +02:00
Christian Kamm 3e1690ff7a Improvements to file recall 2016-09-14 15:42:19 +02:00
Christian Kamm 4abaee7736 Recall: Copy instead of move recalled file #5150
That was an unintentional change in
2662203fb7

Also expand the test case to cover this.

(cherry picked from commit af9c4d0e2f)
2016-09-12 14:09:12 +02:00
Christian Kamm af9c4d0e2f Recall: Copy instead of move recalled file #5150
That was an unintentional change in
2662203fb7

Also expand the test case to cover this.
2016-09-06 10:42:59 +02:00
Olivier Goffart d2bde5489f Propagator, remove the QNAM in the name as the alternative has been removed a long time ago 2016-08-31 10:25:06 +02:00
Daniel Molkentin bb5c2cbfa5 Always follow redirects in network jobs (#4905)
This is a move away from the original policy where jobs
would only follow redirects in special cases.

Two restrictions are in place:

1. We do not allow protocol downgrades (https -> http)
2. We stop redirects after we find them looping (e.g. old = new url, or
indirectly when looping 10 times).

This is closer to RFC conforming behavior, although currently
we will treat 301 replies like they were 302. This is for a separate
commit.

Error handling (and display) also needs improvement.

Addresses #2791
2016-08-09 16:01:29 +02:00
ckamm 28c12a3ca0 Move touched-files tracking to SyncEngine #4927 (#4946) 2016-06-09 12:07:18 +02:00
Olivier Goffart e960b265a8 Merge remote-tracking branch '2.1' into 2.2 2016-05-25 16:23:58 +02:00
Christian Kamm 9aed8dbce8 Checksums: Compute content checksum on download #4375
Cherry-picked from d6d35029
2016-05-20 16:06:30 +02:00
ckamm e6b937f508 LockWatcher: Keep an eye on Windows file locks (#4758)
When a conflict-rename or a temporary-rename fails, notify the
LockWatcher. It'll regularly check whether the file has become
accesible again. When it has, another sync is triggered.

owncloud/enterprise#1288
2016-04-29 16:14:18 +02:00
Olivier Goffart be466b47b7 Merge remote-tracking branch 'origin/2.1' into 2.2 2016-04-29 08:52:17 +02:00
Olivier Goffart 11b144957b PropagateDownload: Throw an error if the file is empty while it should not have been (#4753)
If the downloaded file is empty but the PROPFIND previously announced it
should not have been empty, this might mean the file was somehow corrupted
because of a bug on the server and that we should therefore not accept
the file.

Normaly we accept a change between the actual size of the file and what we
got during discovery because the file might have been updated to a new version
inbetween. But after this patch we won't accept the file if it was replaced
by an empty file.

Will help for issue #4583
Also requested by IL for issue 548
2016-04-29 08:49:27 +02:00
Olivier Goffart fa69d089cf Checksums: remove the downloadChecksumValidationEnabled option
Added in previous commit from pull request #4663

As discussed, we do not need this option so no need to introduce
a new dependency on the config file in the sync engine
2016-04-21 11:43:44 +02:00
Christian Kamm ea40e314d4 Add server capabilities for checksums #4638
* Add checksums/supportedTypes and checksums/preferredUploadType
  capabilities. The default is that no checksum types are supported.

* Remove the transmissionChecksum config option. Servers must now
  use the capabilities to indicate that they are fine with the
  client sending checksums.

Note: This intentionally breaks brandings that overrode
Theme::transmissionChecksum. The override must be removed and the
server's capabilities must be adjusted to include the new values.
2016-04-15 10:58:14 +02:00
Olivier Goffart 6ee7e82913 Handle setFileRecord errors #4632 2016-04-11 14:11:11 +02:00
ckamm 25baa995ec Merge pull request #4532 from ckamm/content-checksum
Enable content checksums #4375
2016-03-14 09:49:31 +01:00
Christian Kamm c554f5383c Downloads: Preserve group ownership #4330 2016-03-03 12:02:06 +01:00
Markus Goetz 266508b691 Merge pull request #4529 from owncloud/dynamic_parallelism_scaling
Propagator: Pump in more requests if we think current ones are quick
2016-03-02 15:23:58 +01:00
Markus Goetz d78c3679e7 Propagator: Pump in more requests if we think current ones are quick
Helps with small file sync #331
When I benchmarked this, it went up to 6 parallelism and
was about 1/3 faster than the previous fixed 3 parallelism.
Doing more than 6 is dangerous because QNAM limits to 6 TCP
connections and also the server might become a bottleneck.

Should also help for #4081
2016-03-02 15:22:21 +01:00
Christian Kamm d6d3502960 Checksums: Compute content checksum on download #4375 2016-03-02 14:28:41 +01:00
ckamm ffa78b99d9 Merge pull request #4512 from owncloud/add-checksum-to-database
Checksums: keep the transfer checksum in the database as the content …
2016-03-02 14:04:37 +01:00
Christian Kamm a9b00a7489 Don't make files read-only when server is too old #4450 2016-03-01 10:11:20 +01:00
Olivier Goffart e6f81d3965 Checksums: keep the transfer checksum in the database as the content checksum
Currently, we only use this for .eml files. But we can just store this checksum
in the database if it was computed anyway.

Issue #4487
2016-02-25 17:17:14 +01:00
Olivier Goffart 60c101d90b PropagatorDownload: fix possible crash
Backtrace seen from the crash reporter where reply() is null.
2016-02-24 19:52:14 +01:00
Christian Kamm abf5a5ad1e Propagation: Fix dir <-> file changes propagating to server #4302
* Ensure every time a file becomes a directory or the other way around
  the item is flagged as INSTRUCTION_TYPE_CHANGE.
* Delete the badly-typed entity if necessary in the propagation jobs.
2016-01-08 05:38:08 +01:00
Christian Kamm 2662203fb7 Windows: Fix deleting and replacing of read-only files #4308 2016-01-05 13:15:59 +01:00
Christian Kamm d4edab02b0 Propagator: Deal with directories becoming files #4302
Note, in particular the revised order of directory deletion jobs.
2016-01-05 10:26:41 +01:00
Christian Kamm 6cf5fc7f7d Permissions: Keep more user permissions
t4.pl discovered that it'd needlessly override permissions sometimes
2015-11-23 13:24:05 +01:00
Christian Kamm 10db6cee6c Rename files 2015-11-23 12:09:25 +01:00
Christian Kamm a25f094c4c Checksums: Don't reupload if size and checksum are unchanged #3235
* Compute the content checksum (in addition to the optional
  transmission checksum) during upload (.eml files only)

* Add hook to compute and compare the checksum in csync_update

* Add content checksum to database, remove transmission checksum
2015-11-23 11:59:56 +01:00
Christian Kamm 175ad6fb77 Reflect read-only permissions in filesystem #3244 2015-11-10 10:14:25 +01:00
ckamm 251679253a Merge pull request #3951 from ckamm/checksum
Checksums stored in database #3735
2015-10-29 10:40:24 +01:00
Christian Kamm 9788055147 Propagator: Add blacklisting of disk space errors #2939 2015-10-29 09:36:59 +01:00
Christian Kamm b7823dc648 Checksum: Put checksum type into separate column #3735 2015-10-28 14:46:20 +01:00
Christian Kamm f1b500d3e0 Checksum: Add env variables to disable #3735 2015-10-28 09:56:39 +01:00
Christian Kamm b1387f801b Propagate: On download store checksum header in db #3735 2015-10-28 09:56:39 +01:00
Christian Kamm 0354289795 Checksums: Improvement in async computation and validation #3735 2015-10-28 09:56:39 +01:00
Olivier Goffart dccf4e9c34 Download: Soft errors for error while resuming (#4000) 2015-10-26 12:31:07 +01:00
Phil Davis f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Christian Kamm 24c41ed0da Propagation: Try another sync on 423 Locked #3387 2015-10-01 13:05:07 +02:00
Christian Kamm 36e8e9ebf5 Propagator: Download disk space checks #2939
* There's a critical 50 MB threshold under which syncs abort
  (OWNCLOUD_CRITICAL_FREE_SPACE)
* The sync client always keeps 250 MB free
  (OWNCLOUD_FREE_SPACE)
2015-10-01 12:59:05 +02:00
Markus Goetz 7fc7925d17 Propagator: Don't corrupt file with broken webserver #3373 2015-07-30 14:40:24 +02:00
Markus Goetz f01b7bb5db Propagator: More debug output for downloads/uploads 2015-07-30 14:40:24 +02:00
Markus Goetz ef1e6add4f Settings: Auto download bandwidth limit #1485 2015-06-29 17:43:25 +02:00
Christian Kamm 28d6d0dc1e Download: Gracefully skip files with 404. #2227 2015-06-17 12:24:21 +02:00
Olivier Goffart 54a42e401b More compilation fixes after the merge 2015-05-26 12:33:19 +02:00
Olivier Goffart 6b27d2e703 Merge remote-tracking branch 'origin/1.8' 2015-05-26 12:28:31 +02:00
Olivier Goffart 6b9e123816 Merge remote-tracking branch 'origin/checksum_1.8' into 1.8 2015-05-22 10:32:37 +02:00
Olivier Goffart fb2295fcec Merge branch 'recall' into 1.8 2015-05-22 10:32:26 +02:00
Christian Kamm 1c84d01584 Windows: Fix build of tests. 2015-05-22 09:17:24 +02:00
Olivier Goffart 3fcce08a22 recall: move the recall code in a namespace 2015-05-21 16:23:54 +02:00
Olivier Goffart 289800c1ba Recall: make it work even if it is not in the root directory 2015-05-21 16:06:53 +02:00
Olivier Goffart 9a02a0f3a8 Recall feature: Fix some style issues 2015-05-21 16:06:52 +02:00
Jakub Moscicki 4e79093f84 recall file prototype 2015-05-21 16:06:52 +02:00
Klaas Freitag 8f277e46d6 TransmissionChecksumming: Remove SyncFileItem dependency. 2015-05-21 15:51:48 +02:00
Klaas Freitag dec3bd4a02 Some more minor cleanups based on the pull request review. 2015-05-20 22:44:12 +02:00
Klaas Freitag 5b5a636cc1 Make TransmissionChecksumValidator child of the job for auto delete.
That way no explicit memory management is needed as the allocation
is freed when the job (parent) is deleted automatically.
2015-05-20 16:54:04 +02:00
Klaas Freitag c7f759fedf Propagator: Use the TransmissionChecksumValidator class. 2015-05-19 17:09:40 +02:00
Klaas Freitag f016d25b4c Propagate downloads: Handle checksum transmission header.
Read a checksum from the HTTP header, and if its there, compare the
downloaded tmp file against it. In case of corruption, schedule a
redownload.
2015-05-19 17:09:40 +02:00
Markus Goetz 08184d07cf Merge branch '1.9' 2015-05-12 23:03:45 +02:00
Markus Goetz cdfafa2180 Propagator: Mention name of conflict file (for debugging) 2015-05-12 17:11:21 +02:00
Jocelyn Turcotte ea39e457f5 Fix the build 2015-05-12 10:35:57 +02:00
Daniel Molkentin b54f2b3b31 Merge remote-tracking branch 'origin/1.9'
Conflicts:
	VERSION.cmake
	src/libsync/propagatedownload.cpp
	src/libsync/propagateupload.cpp
2015-05-12 10:03:38 +02:00
Markus Goetz 625e61516f Propagator: Limit length of temporary file name #2789 (fixup)
Fix 22c35c4d15
2015-05-11 15:42:35 +02:00
Markus Goetz 22c35c4d15 Propagator: Limit length of temporary file name #2789 2015-05-08 16:42:03 +02:00
Christian Kamm 79ac61684c Propagator: Overwrite local data only if unchanged. #3156 2015-05-07 14:43:33 +02:00
Olivier Goffart ddfb7f3b7a Merge remote-tracking branch 'origin/1.8' 2015-04-27 12:20:11 +02:00
Christian Kamm 7c1281dd06 Windows: Fix rename of finished file. #3073
The file was still open and therefore couldn't be renamed...
2015-04-22 14:46:04 +02:00
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