Olivier Goffart
868f8029a2
Close the database file in all cases.
...
If the database was empty, we forgot to close the file descriptor,
making it impssible to remove the database and replace it with the real
one
2013-08-16 12:23:26 +02:00
Olivier Goffart
14219a1ea5
Log error of sqlite3_close
2013-08-15 18:39:26 +02:00
Daniel Molkentin
1663c84db7
Return an error if rename fails on win32.
...
Amends 9ea39dbaa9
.
2013-08-15 18:06:27 +02:00
Klaas Freitag
9ea39dbaa9
win32: Retry renaming in case of access denied.
2013-08-15 17:40:30 +02:00
Olivier Goffart
38a5ff42e0
show the errno in the debug when renaming the db fails
2013-08-15 13:51:57 +02:00
Klaas Freitag
274da3ad0b
std: Fix uninitialized rc that polutes return value.
2013-08-14 19:03:36 +02:00
Daniel Molkentin
d75f807c01
Send OC-Total-Length
...
As per https://github.com/owncloud/core/issues/4343
2013-08-08 00:48:48 +02:00
Klaas Freitag
2d3272182b
Add correct cast to 64 bit type.
2013-08-07 16:58:46 +02:00
Klaas Freitag
76ee4cb3ba
Add symlinks to the file tree with instruction IGNORE
2013-08-07 12:14:29 +02:00
Klaas Freitag
7b22972630
Add excluded files to the tree with IGNORE instruction
2013-08-06 18:01:34 +02:00
Klaas Freitag
d88a5e1b11
Rename progress init function to reasonable name.
2013-08-06 15:42:02 +02:00
Klaas Freitag
d585742609
Log if the Etag in the journal is empty.
2013-08-06 12:12:53 +02:00
Klaas Freitag
d910a3af8b
Notify sync start and end always.
2013-08-06 12:12:52 +02:00
Olivier Goffart
6ad2920809
Load the statedb in csync_update rather than in csync_init.
...
This also allow to reduce duplicate code in csync_commit, and ease the
error reporting of csync_commit
csync_commit is supposed to be done after the previous sync, it is
better to open the statedb before the sync
2013-08-06 12:12:52 +02:00
Klaas Freitag
a42d942a35
Finalize progress before error handling.
2013-08-06 12:12:52 +02:00
Klaas Freitag
721443feea
deliver file size with the progress callback in propagate.
2013-08-06 12:12:52 +02:00
Klaas Freitag
ba73405613
Defines for progress start- and end delete.
2013-08-06 12:12:52 +02:00
Klaas Freitag
c89a55984b
Emit start- and end delete progress.
2013-08-06 12:12:52 +02:00
Daniel Molkentin
8c9799cede
Ignore false-positive compiler warnings
2013-08-02 15:19:41 +02:00
Daniel Molkentin
54b8f4d89b
transfer parameter is unused, mute
2013-08-02 11:35:03 +02:00
Olivier Goffart
6766f41bf5
Add a hook in httpbf to do the logging
2013-08-01 13:13:05 +02:00
Klaas Freitag
59a133fe03
Fix logging for cross platform.
2013-08-01 09:41:17 +02:00
Klaas Freitag
344ea661c9
Add more logging to chunking routines.
2013-07-31 16:26:28 +02:00
Daniel Molkentin
d9b34121ae
Fix OS X build with -Werror
2013-07-31 14:50:44 +02:00
Daniel Molkentin
8d99364d63
Eliminate all warnings
...
- use proper casts
- use aproproate types
- offer to build with -Werror
- make printf attribute hinting gnu format style
- remove unused helper methods
- begin to use inttyes.h macros where suitable
- move var declarations to the beginning of the method
- properly use _FILE_OFFSET_BITS
- silence variables unused depending on the define
2013-07-31 13:12:10 +02:00
Daniel Molkentin
228641763b
Fix compilation on w32
2013-07-30 18:17:50 +02:00
Olivier Goffart
4f5bfbdb78
Use int64_t instead of off_t
...
off_t is 64 or 32 bit depending on the architecture and the defines for
large file support. It is better to always use int64_t which is always
64 bits
2013-07-30 16:33:19 +02:00
Klaas Freitag
2fcfe883eb
Proper error reporting for HBF PUT fails.
2013-07-30 08:56:53 +02:00
Olivier Goffart
af7e36422e
Add ignore files that need cleanup
...
Add the possibility to ignore files but specify they should be deleted
if the directory is deleted.
2013-07-29 15:03:25 +02:00
Olivier Goffart
45c98bad19
fix crash
2013-07-29 15:03:05 +02:00
Klaas Freitag
2cc5bbe187
ownCloud: Some fixes to promote the correct progress.
2013-07-26 13:43:02 +02:00
Klaas Freitag
0a15f0e7ad
New progress API: Consolidate to one progress Callback having all info.
...
Before there were two callbacks, one for the individual file and one for
for the overall progress. Now its more easy and clean.
2013-07-25 15:36:46 +02:00
Olivier Goffart
09e30509d1
Propertly report the error from the server while uploading
2013-07-23 17:40:44 +02:00
Olivier Goffart
75682f981d
Add a threshold to httpbf before splitting the files
2013-07-23 17:31:31 +02:00
Olivier Goffart
7a8b07443f
Fix cases where the file has been replaced by another with the same mtime
...
IL issue 169
2013-07-23 16:03:50 +02:00
Klaas Freitag
917cc7faab
Base overall progress data on both trees not just one
2013-07-22 12:55:24 +02:00
Klaas Freitag
a12782dccf
Add callback parameter and call overall progress bar for initialization.
2013-07-19 17:04:31 +02:00
Klaas Freitag
59ed14698c
Fix header
2013-07-19 17:04:13 +02:00
Klaas Freitag
45cdcb7502
Add a progress callback for overall and individual file up and download
...
progress.
2013-07-19 12:26:48 +02:00
Olivier Goffart
fdd1f885a1
Fixup previous commit.
...
We should not overwrite the error
2013-07-16 13:34:59 +02:00
Olivier Goffart
db7e8560cf
Mark parent directory as error if a file fails to download
...
The result is that we do not save the parent directory in the db
(recursively) so on the next sync, we don't read this directory from the
db as there might be missing entries since download error are not saved
in the db.
2013-07-16 13:34:47 +02:00
Olivier Goffart
6beb96293f
Do not save for resume if there is an error from the server
...
errors (such as 500) may mean the the server do not suport
resuming
2013-07-16 13:34:22 +02:00
Markus Goetz
1263ca990d
Fix download resuming on OS X
2013-07-16 13:33:55 +02:00
Klaas Freitag
e12adbcc7e
Rather use _fstat64 on win32 for proper size types.
2013-07-16 13:32:40 +02:00
Klaas Freitag
32559175c9
Use correct stat struct on all platforms.
2013-07-16 12:22:52 +02:00
Daniel Molkentin
6882880ba7
Add csync_clear_exclude_list
...
This requires the introduction of c_strlist_clear(),
which does not destroy, but only clear a string list.
2013-07-15 14:37:18 +02:00
Klaas Freitag
207ee9955f
Dealloc the query cache in statedb_close
2013-07-12 16:37:33 +02:00
Klaas Freitag
365fb2a5fe
Optimize the get_stat_by_hash function.
2013-07-12 16:22:58 +02:00
Klaas Freitag
4aa0c58bb0
Remove duplicate close, coverity found.
2013-07-12 11:41:51 +02:00
Klaas Freitag
c082a3f763
Preinitialize buf with zero, coverity found.
2013-07-12 11:41:51 +02:00