[Pkg-owncloud-commits] [owncloud-client] 124/219: SyncEngine: Better reporting when ignoring hardlinks. #2217

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit a88ac00115fa391b93846828962688f7d7512802
Author: Christian Kamm <kamm at incasoftware.de>
Date:   Thu Sep 18 11:18:23 2014 +0200

    SyncEngine: Better reporting when ignoring hardlinks. #2217
    
    Also touch csync to actually let us know it's ignoring the file
    due to it having hard links.
---
 csync/src/csync.h         | 1 +
 csync/src/csync_update.c  | 1 +
 src/mirall/syncengine.cpp | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/csync/src/csync.h b/csync/src/csync.h
index 2a793eb..82b9c22 100644
--- a/csync/src/csync.h
+++ b/csync/src/csync.h
@@ -94,6 +94,7 @@ enum csync_status_codes_e {
   CSYNC_STATUS_ABORTED,
     /* Codes for file individual status: */
     CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK,
+    CSYNC_STATUS_INDIVIDUAL_IS_HARDLINK,
     CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST,
     CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS,
     CYSNC_STATUS_FILE_LOCKED_OR_OPEN
diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c
index 3d14eb8..7a15cd8 100644
--- a/csync/src/csync_update.c
+++ b/csync/src/csync_update.c
@@ -185,6 +185,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
   if (type == CSYNC_FTW_TYPE_FILE ) {
     if( fs->nlink > 1) {
       st->instruction = CSYNC_INSTRUCTION_IGNORE;
+      st->error_status = CSYNC_STATUS_INDIVIDUAL_IS_HARDLINK;
       goto out;
     }
 
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index cd668af..ac4c4bf 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -354,6 +354,9 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     case CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK:
         item._errorString = tr("Symbolic links are not supported in syncing.");
         break;
+    case CSYNC_STATUS_INDIVIDUAL_IS_HARDLINK:
+        item._errorString = tr("Hard links are not supported in syncing.");
+        break;
     case CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST:
         item._errorString = tr("File is listed on the ignore list.");
         break;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list