Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion fuse/sfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ int sfs_link(const char *path, const char *newpath) {
retstat = -errno;
} else {
batch_file_event (newpath, "norec");
// add old path as event too to ensure that hardlinks are
// created on targets when rsync -H is used
batch_file_event(path, "norec");
}

return retstat;
Expand Down Expand Up @@ -914,7 +917,7 @@ int sfs_create(const char *path, mode_t mode, struct fuse_file_info *fi) {
sfs_fullpath(fpath, path);

BEGIN_PERM;
fd = creat(fpath, mode);
fd = open(fpath, fi->flags, mode);
END_PERM;
if (fd < 0) {
retstat = -errno;
Expand Down
6 changes: 2 additions & 4 deletions php-sync/sync.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,13 @@ public function scheduleBatches ($mode, $toSchedule) {
) {
# flush bulk
if ($mtime === FALSE) {
syslog(LOG_WARN, "Cannot get mtime of $batchFile, assuming new bulk");
syslog(LOG_WARNING, "Cannot get mtime of $batchFile, assuming new bulk");
}
if ($bulkCount > 0) {
$tasks[$rowno++][] = array($node, $bulk);
}
$bulk = array();
$bulkCount = 0;
$lastType = null;
break; // we don't send more than one bulk per node, anyway
}

$bulk[] = $batch;
Expand Down Expand Up @@ -457,7 +455,7 @@ public function linkLocalBatches () {
}

foreach ($batches as &$batch) {
if (!preg_match ("/^[^_]+_([^_]+)_[^.]+\.batch$/", $batch, $match)) {
if (!preg_match ("/^\d+_([^_]+)_.*\.batch$/", $batch, $match)) {
continue;
}
$batchNode = $match[1];
Expand Down