Commit graph

108 commits

Author SHA1 Message Date
Klaas Freitag
aa213eeafb Do not check for the ETag in case the HTTP request connected. 2013-12-11 13:51:38 +01:00
Klaas Freitag
b68e721f05 Do not error out on ETag if the status klass is != 2. 2013-12-11 12:59:11 +01:00
Olivier Goffart
bf309f83f4 Don't keep the temporary file if the transfer fails because of a wrong etag
The downloaded file is corrupted, remove it.
2013-12-11 12:48:11 +01:00
Daniel Molkentin
80d202c630 Fix build on Win32 2013-12-10 17:19:36 +01:00
Olivier Goffart
0360babe02 usleep is not working on windows, use QThread::usleep
Shoud fix #1082
2013-12-10 14:03:01 +01:00
Klaas Freitag
fc986b0ab8 If item is a directory, remove its contents from the database as well.
Fixes bug #1257
2013-12-06 16:38:43 +01:00
Klaas Freitag
6fad20d5fc Show local MOVE operations only for top level directory instead for all
files.

This fixes bug mirall#1240
2013-12-06 12:32:26 +01:00
Olivier Goffart
fa9d9c9909 Maybe we need to destroy the decompress context before the request.
Possibly fix the issue #1229
2013-12-05 16:51:39 +01:00
Klaas Freitag
b3620e320b Avoid a comparison warning on win32 2013-12-03 17:09:57 +01:00
Klaas Freitag
883576cb95 Fix Win32 move file operation. 2013-12-03 17:07:42 +01:00
Olivier Goffart
1f5c4bde14 Fix windows rename of temporary files 2013-12-03 16:10:44 +01:00
Olivier Goffart
09d850bfaa When the temporary file is the same size as the file we would download, just keep it
Don't download the file if the temporary file is complete.

else, we get error from server: Requested Range not satisfiable
2013-12-03 14:44:04 +01:00
Olivier Goffart
ef8fe11f5a Do not write the directory etag in the database in case of soft error
Else we won't retry next time as we think nothing has changed.
2013-11-28 10:01:30 +01:00
Olivier Goffart
30db533cea Stop iterating files when aborting. 2013-11-28 10:01:30 +01:00
Olivier Goffart
99eeaa0db5 no need to set twice the error string
done() is already taking care of that
2013-11-28 10:01:30 +01:00
Klaas Freitag
23007613a9 Fix progress bar in new propagator. 2013-11-27 16:48:16 +01:00
Klaas Freitag
232cbc45b5 Simplify progress and error signals again.
Now handle everything through the progress signal and let the errors
be progressed in the done slot.

Remove unused code, fix sorting of the list, more efficiency.

This fixes #916
2013-11-26 14:02:11 +01:00
Klaas Freitag
090e474d70 Add a couple of missing progress signals. 2013-11-26 14:02:11 +01:00
Klaas Freitag
4f7546768b Do not blacklist Softerrors. 2013-11-26 14:02:11 +01:00
Olivier Goffart
5c8b6ed902 Fix Remove -gzip from etag
Remove it from both "foo"-gzip  and "foo-gzip"

See issue #1195
2013-11-26 12:10:52 +01:00
Markus Goetz
fa715ce135 Propagator: Open download file as Unbuffered 2013-11-25 19:25:19 +01:00
Markus Goetz
911e0bdd6e Propagator: Check write errors when downloading 2013-11-25 19:25:19 +01:00
Olivier Goffart
fa0f773fcb Separate the case of file changing durng upload in the chunk or non chunk case.
If the file is changed between chunk, it is easy and we can just retry as the
file has not been changed on the server.
But if the file is changed after it has been updated on the server, we must still
update the database with the etag. (and possibly delete the partial file)

Relates to issue #1002
2013-11-25 19:16:54 +01:00
Markus Goetz
ac8296fb94 Propagator: Check E-Tag when resuming
Should fix #756
2013-11-25 19:01:04 +01:00
Olivier Goffart
ca3d8ab193 Add one case of missing -gzip removal 2013-11-25 17:48:57 +01:00
Markus Goetz
72d2ac09e3 Propagator: Don't ignore error if no HTTP error code 2013-11-25 16:37:48 +01:00
Olivier Goffart
6b7da798b8 Remove -gzip from Etag
Fix #1195
2013-11-25 16:30:13 +01:00
Klaas Freitag
dc29046d61 Add new progressProblem signal and slots.
Now the sync problems are handled differently than the sync progress
to ease error message handling and stuff.
2013-11-25 16:18:07 +01:00
Klaas Freitag
055a8d7e74 Do not display error messages if user aborts the sync run. 2013-11-24 22:26:50 +01:00
Klaas Freitag
ecb2444923 Handle changing source file in upload correctly.
Delete the file on the server if the source file is new, but
the source did not arrive completely within a timespan.
2013-11-22 19:45:26 +01:00
Klaas Freitag
55e82ee4c1 Made transaction management a bit more transparent. Some fixes. 2013-11-21 11:13:58 +01:00
Klaas Freitag
97c661c909 Cleanups 2013-11-20 14:59:58 +01:00
Klaas Freitag
5900b1ad25 Add blacklisting for files with error conditions. 2013-11-20 14:27:44 +01:00
Klaas Freitag
20b9ae757d Add a http status code varialbe to the sync item object. 2013-11-20 14:27:44 +01:00
Markus Goetz
e551e92e13 Downloads: Ignore file if no ETag was sent
Fixes part of #970
2013-11-19 12:44:25 +01:00
Klaas Freitag
69269f8f75 Use transactions to speed up database access. 2013-11-18 10:02:32 +01:00
Klaas Freitag
b0f6628584 Moved implementation of start() to cpp file. 2013-11-18 10:02:32 +01:00
Klaas Freitag
42f6867329 Add some useful logging. 2013-11-18 10:02:32 +01:00
Olivier Goffart
c15a1eedd1 Only update the db for ETAG if the etag has changed for directories 2013-11-15 13:53:18 +01:00
Klaas Freitag
c22f8a47f1 Initialise values properly, avoid warning. 2013-11-15 10:32:13 +01:00
Olivier Goffart
b3972a5ba8 Do not fetch the file id in the propagator with a HEAD
Normally, the fileid comes with the PUT or the GET.
If it did not comes with the PUT, it means the server do not support
fileid,  we should not query it with a useless HEAD.

Also, in case the fileid changes (which it should not)  update anyway
to the new fileid in the db
2013-11-15 10:18:19 +01:00
Olivier Goffart
e8e27b61f6 Revert the changes that fetch the file id in the propagator.
We don't want to fetch the file id in the propagator.

Revert "Put item member variable to base class."
This reverts commit f7aa2aa348.

Revert "Add isValidFileId and getFileIdPropget methods."
This reverts commit ccd254abba.
2013-11-14 14:59:03 +01:00
Klaas Freitag
ccd254abba Add isValidFileId and getFileIdPropget methods. 2013-11-14 11:37:08 +01:00
Klaas Freitag
2eb77445be Add rename actions to progress dispatching.
With that fix rename operations are shown as such in the progress
window and in bubble help etc.
2013-11-08 16:21:59 +01:00
Klaas Freitag
a458ffd472 Add missing return in error case. 2013-11-08 12:56:54 +01:00
Klaas Freitag
162acc1cc2 Fix conflict file handling, create a proper conflict file name.
Before this fix, the conflict file name was set in the file name
variable which lead to the problem that the subsequent rename of
the temp file to the final final filename was moving the temp file on
the conflict file. No final file was there.
2013-11-07 16:53:22 +01:00
Klaas Freitag
5cd2be058d Fix local rename. 2013-11-05 17:50:09 +01:00
Olivier Goffart
f0a1ac4346 Fix syncing folder with nothing in it
Do the start after connecting, as the finish may be imediate if there
is nothing to do.
2013-10-31 12:11:56 +01:00
Klaas Freitag
c66a1d1895 Removed unused code from LocalRename 2013-10-30 18:14:33 +01:00
Klaas Freitag
cdee0dc1cf Added a PropagateLocalRename job to do local renames. 2013-10-30 17:37:34 +01:00