Olivier Goffart
9dcce01e54
csync: ignore files/folder for which stat fails
...
instead of pretending it suicceed and not recursing in it.
This fixes a bug in which a folder with a too long name would be properly
created, then removed on the server in the next sync.
(cherry picked from commit 4bbf7669091cde7ec726b1708d8c54427b68f016)
Conflicts:
csync/src/csync.h
csync/src/csync_exclude.h
csync/src/csync_update.c
2015-08-11 11:17:20 +02:00
Olivier Goffart
2a4396fbdb
Fixup ce5be89a18
2015-08-07 11:05:04 +02:00
Olivier Goffart
ce5be89a18
Fix warning
...
csync_vio_local_unix.c:109:7: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
asprintf(&file_stat->original_name, "%s/%s", handle->path, dirent->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-08-06 13:58:04 +02:00
Olivier Goffart
499e13377d
check_vio_ext.c: assert_string_equal is a macro and we cannot have #ifdef in it
2015-08-06 10:02:12 +02:00
Olivier Goffart
157f59d44a
Csync tests: fix on linux
...
Linux do not iconv to decode filenames
2015-08-05 11:09:27 +02:00
Markus Goetz
f6cd2c79d5
CSync: Proper error for invalid filenames #2777 #3128 #2240
2015-08-04 22:13:38 +02:00
Markus Goetz
a7b0f7b42e
check_vio_ext: Fix on OS X
2015-08-04 17:25:48 +02:00
Markus Goetz
cdb556e404
Reconcile: Improve debug output
2015-07-31 16:43:47 +02:00
Klaas Freitag
0c5528806d
csync cmake: Removed not needed define of DATADIR.
2015-07-30 16:38:30 +02:00
Klaas Freitag
3b510969a2
Fix test, make it independent on the sort order of readdir.
2015-07-27 13:28:21 +02:00
Olivier Goffart
0ccaae9a22
Confirm feature: Confirm for any folder, not only shared ones
...
issue #3148
2015-07-27 09:54:20 +02:00
Klaas Freitag
c72b6fb8e6
csync_update: Reorg the code a bit to make it easier to read and understand
2015-07-15 15:54:41 +02:00
Klaas Freitag
ddf7419aca
csync: Initialize the hidden files flag properly.
2015-07-15 15:54:41 +02:00
Klaas Freitag
27e0f9d132
csync: Updated and added some documentation.
2015-07-15 15:54:41 +02:00
Klaas Freitag
a4336092f6
Hidden Files: Add a setting to ignore hidden files or not.
...
This setting goes to the folder definition. By default, no hidden
files are synced.
2015-07-15 15:54:41 +02:00
Klaas Freitag
e11f59af32
csync_update: store the remote ignore information into tree (from tmp)
...
This way the propagator is able to skip a remove if ingored files are
exiting.
2015-07-15 15:49:27 +02:00
Klaas Freitag
b0aedef4b0
Sync: Store information about ignored files on the server in database.
...
That allows better handling of remove requests that should not be done
because the directory is not empty on the remote side (as it contains
ignored files).
2015-07-15 15:49:27 +02:00
Klaas Freitag
c940762b7c
csync_update: set has_ignored_files in case of hidden files.
...
Re-arragned the code a bit for better overview on whats happening.
2015-07-15 15:20:46 +02:00
Klaas Freitag
7aa2b50828
csync_update: Handling hidden files as excluded files, as intended.
2015-07-15 15:20:46 +02:00
Klaas Freitag
e0abbc0b83
vio_local: Properly detect if files are hidden.
...
On Linux and Mac, check for the leading dot. On Windows,
there is an flag set in the result struct of fetFileInformationByHandle.
2015-07-15 15:20:46 +02:00
Markus Goetz
cd64d3ae2c
CSync: Split csync_vio_local.c
...
This is to make room for further improvements #880
2015-07-13 15:54:09 +02:00
Olivier Goffart
45180a024d
Rename should_update_etag to should_update_metadata
...
This should avoid some confusion
2015-07-09 15:05:37 +02:00
Klaas Freitag
7f628e6f7e
c_path: Fix function description.
2015-07-08 18:13:41 +02:00
Klaas Freitag
a076a170ee
vio_local: strncat only needs two chars as limit.
2015-07-08 18:13:41 +02:00
Klaas Freitag
ccc91a52a8
vio_local: Give strncpy and strncat enough space to copy closing zero.
2015-07-08 18:13:41 +02:00
Klaas Freitag
4cb78999d2
vio_local: Simplify and fix the error out behaviour of win32 impl.
...
This avoids leaking of a stat struct in error case.
2015-07-08 18:13:41 +02:00
Klaas Freitag
1a69e2ae8d
vio_local: Remove commented code.
2015-07-08 18:13:41 +02:00
Klaas Freitag
c7ba7c8e9f
Fix comment for c_path_to_UNC, plus cleanup of superflous debug.
2015-07-08 18:13:41 +02:00
Klaas Freitag
8bb1a49aaf
Use strncat and strncpy rather than the strcpy and friends.
2015-07-08 18:13:40 +02:00
Klaas Freitag
d303df7fa0
do not use the path function here.
2015-07-08 18:13:40 +02:00
Klaas Freitag
a280007dc2
Added another test case with content in the deep path (also win32).
2015-07-08 18:13:40 +02:00
Klaas Freitag
d9b44b3a69
Created two functions c_utf8_string_to_locale and c_utf8_path_to_locale.
...
Before we only had c_utf8_to_locale, but now functionality is needed to
convert a path to UNC before converting it. That does c_utf8_path_to_locale
now, while c_utf8_string_to_locale only converts the plain string, ie.
to generate wide char strings for output.
2015-07-08 18:13:39 +02:00
Klaas Freitag
5214189eb2
Moved the makeWinLongPath function to c_path and rename to c_path_to_UNC
...
Other cleanups like streamlined allocation and more.
2015-07-08 18:13:39 +02:00
Klaas Freitag
3aed7fc0be
Removed dead code from csync_utils. Functionality moved to Qt based code.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2e04eba74b
Long Win Pathes: Added test to test dir traversal with long pathes.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2cce8065ab
CMocka Testing: Install the cmocka library
2015-07-08 18:13:39 +02:00
Klaas Freitag
8183c37dfe
long win pathes: Some minor refinements and documentations
2015-07-08 18:13:39 +02:00
Klaas Freitag
f98af43d31
Add cross platform definition for chdir and getcwd.
2015-07-08 18:13:39 +02:00
Klaas Freitag
b9b5e1cf33
Long win pathes: Make makeLongWinPath function return the num of alloc bytes.
...
This enables the calling function to free these accordingly. That is needed
because the makeLongWinPath for efficiency reasons does not always realloc
the original string.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2b391396c6
vio local: Use win32 native functions to traverse the file tree.
...
Native functions to replace the not native readdir and opendir functions.
This works with long filenames now.
2015-07-08 18:13:39 +02:00
Klaas Freitag
5caff8cc93
Add a FIXME comment.
2015-07-08 18:13:39 +02:00
Klaas Freitag
599ee90500
Remove definition of TDIR, its not longer in use.
...
The directory traverse handle struct is platform dependant now.
2015-07-08 18:13:39 +02:00
Klaas Freitag
2f0a404116
Unit test for the long filename conversion on win32
2015-07-08 18:13:38 +02:00
Klaas Freitag
472eed7f20
Added function to change the filename to be longer than MAX_PATH
2015-07-08 18:13:38 +02:00
Klaas Freitag
7d2bb261dc
Removed the setFileHidden function for now
2015-07-08 18:13:38 +02:00
Christian Kamm
e88ce41f4f
test: Fix compile of check_csync_update.
2015-07-02 10:04:20 +02:00
Olivier Goffart
575ca50aac
csync: Do not ignore hard links anymore
...
There is no reason to ignore them. Downloading a file that is hardlinked
will break the link.
Will solve syncing NTFS directories #3241
2015-07-01 13:05:08 +02:00
Olivier Goffart
84fdc8c6c0
Merge remote-tracking branch 'origin/1.8'
2015-06-26 17:54:35 +02:00
Olivier Goffart
516509b4ed
csync_statedb: fix leak
...
Spotted by coverity (CID 98061)
2015-06-26 17:01:43 +02:00
Olivier Goffart
29fecb029e
Merge remote-tracking branch 'origin/1.8'
...
Conflicts:
VERSION.cmake
src/gui/accountsettings.cpp
src/gui/accountsettings.h
2015-06-25 12:30:52 +02:00