* 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.
Since owncloud 2.1, csync_vio_local_stat was optimized because readdir
would already fetch most of the info. This works for the discovery,
but not later. And we used this function later for symliks and co.
So this fixes the .lnk on windows
Issue #4300
This conflicts with the KDE_INSTALL_PLUGINDIR and prevent the
dolphin plugin to be installed at the right location.
Since csync no longer have plugin, this can be removed
* 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
A 403 is a reply code sent from the file firewall to indicate that
this directory is forbidden to use for the user.
The patch handles it by setting the state to IGNORED.
This addresses #3490
On unix we don't safe much (otherwise csync would have been
designed differently).
On windows however, the readdir already fetch all the info, so we
can as well use it.
We still have to query for the file id but we might optimize that later
So we avoid lots of memory allocation.
We can work with char* directly since both the pattern and the file
name are in UTF-8 and there is no need to understand unicode for
such pattern.
(In fact, '?' would not match anyore non-ascii characters, but I
don't think that's a problem. I don't think anyone use '?' in its
exclude list. And the two allocations per call to csync_fnmatch are
really worth getting rid of)
Otherwise win32 api simply does not open reparse points at all,
such as junctions.
This will improve the user experience of #3813 as we now identify
the junctions as symlinks.... and ignore them properly.
Use an iterator variable declared outside of the loop condition
expression.
MinGW doesn't support C99 very easily and it's easier to keep
our C code C89 compliant.
This function only checks the full path and the basename and is thus
around 7x faster. It is very useful in a csync_update context where
we know that the leading dirs have already been checked for exclusion.
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
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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~