Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package seadrive-fuse for openSUSE:Factory 
checked in at 2026-03-26 21:09:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/seadrive-fuse (Old)
 and      /work/SRC/openSUSE:Factory/.seadrive-fuse.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "seadrive-fuse"

Thu Mar 26 21:09:41 2026 rev:9 rq:1342712 version:3.0.21

Changes:
--------
--- /work/SRC/openSUSE:Factory/seadrive-fuse/seadrive-fuse.changes      
2026-01-22 15:13:36.596814915 +0100
+++ /work/SRC/openSUSE:Factory/.seadrive-fuse.new.8177/seadrive-fuse.changes    
2026-03-27 06:50:06.611461127 +0100
@@ -1,0 +2,8 @@
+Thu Mar 26 07:38:48 UTC 2026 - Paolo Stivanin <[email protected]>
+
+- update to 3.0.21:
+  * Access repo_locked_files requires hash_lock (#33)
+  * Check repo list per 30s
+  * Remove sync error (#32)
+
+-------------------------------------------------------------------

Old:
----
  seadrive-fuse-3.0.18.tar.gz

New:
----
  seadrive-fuse-3.0.21.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ seadrive-fuse.spec ++++++
--- /var/tmp/diff_new_pack.Kd4IsR/_old  2026-03-27 06:50:07.139482871 +0100
+++ /var/tmp/diff_new_pack.Kd4IsR/_new  2026-03-27 06:50:07.143483036 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           seadrive-fuse
-Version:        3.0.18
+Version:        3.0.21
 Release:        0
 Summary:        SeaDrive daemon with FUSE interface
 License:        GPL-2.0-only

++++++ fuse3.patch ++++++
--- /var/tmp/diff_new_pack.Kd4IsR/_old  2026-03-27 06:50:07.171484189 +0100
+++ /var/tmp/diff_new_pack.Kd4IsR/_new  2026-03-27 06:50:07.179484519 +0100
@@ -4,10 +4,10 @@
 
     Port to fuse3
 
-diff --git a/README.md b/README.md
-index 8be6fc9..f2af371 100644
---- a/README.md
-+++ b/README.md
+Index: seadrive-fuse-3.0.21/README.md
+===================================================================
+--- seadrive-fuse-3.0.21.orig/README.md
++++ seadrive-fuse-3.0.21/README.md
 @@ -4,7 +4,7 @@ SeaDrive daemon with FUSE interface
  # Building
  ## Ubuntu Linux
@@ -17,10 +17,10 @@
  ```
  
  First, you shoud get the latest source of 
[libsearpc](https://github.com/haiwen/libsearpc) with `v3.2-latest` tag and 
[seadrive-fuse](https://github.com/haiwen/seadrive-fuse).
-diff --git a/configure.ac b/configure.ac
-index 3860ee5..7129f83 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: seadrive-fuse-3.0.21/configure.ac
+===================================================================
+--- seadrive-fuse-3.0.21.orig/configure.ac
++++ seadrive-fuse-3.0.21/configure.ac
 @@ -154,7 +154,7 @@ GLIB_REQUIRED=2.16.0
  SEARPC_REQUIRED=1.0
  JANSSON_REQUIRED=2.2.1
@@ -39,10 +39,10 @@
     AC_SUBST(FUSE_CFLAGS)
     AC_SUBST(FUSE_LIBS)
  fi
-diff --git a/src/fuse-ops.c b/src/fuse-ops.c
-index afd4936..cb5d4e5 100644
---- a/src/fuse-ops.c
-+++ b/src/fuse-ops.c
+Index: seadrive-fuse-3.0.21/src/fuse-ops.c
+===================================================================
+--- seadrive-fuse-3.0.21.orig/src/fuse-ops.c
++++ seadrive-fuse-3.0.21/src/fuse-ops.c
 @@ -2,8 +2,8 @@
  
  #if defined __linux__ || defined __APPLE__
@@ -63,7 +63,7 @@
  notify_fs_op_error (const char *type, const char *path)
  {
      json_t *msg = json_object();
-@@ -327,8 +327,9 @@ get_category_dir_mtime (const char *server, const char 
*user, RepoType type)
+@@ -327,8 +327,9 @@ get_category_dir_mtime (const char *serv
  }
  
  int
@@ -74,7 +74,7 @@
      FusePathComps comps;
      int ret = 0;
      uid_t uid;
-@@ -438,7 +439,7 @@ readdir_root_accounts (void *buf, fuse_fill_dir_t filler)
+@@ -441,7 +442,7 @@ readdir_root_accounts (void *buf, fuse_f
      }
      for (ptr = accounts; ptr; ptr = ptr->next) {
          account = ptr->data;
@@ -83,7 +83,7 @@
      }
      g_list_free_full (accounts, (GDestroyNotify)seaf_account_free);
  
-@@ -459,10 +460,10 @@ readdir_root (AccountInfo *account, void *buf, 
fuse_fill_dir_t filler)
+@@ -462,10 +463,10 @@ readdir_root (AccountInfo *account, void
          type_str = ptr->data;
  #ifdef __APPLE__
          dname_nfd = g_utf8_normalize (type_str, -1, G_NORMALIZE_NFD);
@@ -96,7 +96,7 @@
  #endif
      }
  
-@@ -498,10 +499,10 @@ readdir_category (AccountInfo *account, RepoType type, 
void *buf, fuse_fill_dir_
+@@ -501,10 +502,10 @@ readdir_category (AccountInfo *account,
          dname = g_path_get_basename (info->display_name);
  #ifdef __APPLE__
          dname_nfd = g_utf8_normalize (dname, -1, G_NORMALIZE_NFD);
@@ -109,7 +109,7 @@
  #endif
  
          g_free (dname);
-@@ -550,7 +551,7 @@ readdir_repo (const char *repo_id, const char *path, void 
*buf, fuse_fill_dir_t
+@@ -553,7 +554,7 @@ readdir_repo (const char *repo_id, const
          if (seaf_repo_manager_is_path_invisible (seaf->repo_mgr, repo_id, 
dname)) {
              continue;
          }
@@ -118,7 +118,7 @@
      }
      g_hash_table_destroy (dirents);
  
-@@ -562,8 +563,10 @@ out:
+@@ -565,8 +566,10 @@ out:
  int
  seadrive_fuse_readdir(const char *path, void *buf,
                        fuse_fill_dir_t filler, off_t offset,
@@ -130,7 +130,7 @@
      FusePathComps comps;
      int ret = 0;
  
-@@ -572,8 +575,8 @@ seadrive_fuse_readdir(const char *path, void *buf,
+@@ -575,8 +578,8 @@ seadrive_fuse_readdir(const char *path,
      if (!seaf->started)
          return 0;
  
@@ -141,7 +141,7 @@
  
      memset (&comps, 0, sizeof(comps));
  
-@@ -1225,8 +1228,11 @@ out:
+@@ -1228,8 +1231,11 @@ out:
      return ret;
  }
  
@@ -154,7 +154,7 @@
      FusePathComps comps1, comps2;
      int ret = 0;
  
-@@ -1556,8 +1562,9 @@ int seadrive_fuse_release (const char *path, struct 
fuse_file_info *info)
+@@ -1559,8 +1565,9 @@ int seadrive_fuse_release (const char *p
  }
  
  int
@@ -165,7 +165,7 @@
      FusePathComps comps;
      char *repo_id, *file_path;
      FileCacheStat st;
-@@ -1697,8 +1704,9 @@ seadrive_fuse_statfs (const char *path, struct statvfs 
*buf)
+@@ -1700,8 +1707,9 @@ seadrive_fuse_statfs (const char *path,
  }
  
  int
@@ -173,10 +173,10 @@
 +seadrive_fuse_chmod (const char *path, mode_t mode, struct fuse_file_info *fi)
  {
 +    (void)fi;
-     FusePathComps comps;
- 
-     seaf_debug ("chmod %s called. mode = %o.\n", path, mode);
-@@ -1713,8 +1721,9 @@ seadrive_fuse_chmod (const char *path, mode_t mode)
+     RepoTreeStat tree_st;
+     char *repo_id = NULL, *file_path = NULL;
+     SeafRepo *repo = NULL;
+@@ -1766,8 +1774,9 @@ out:
  }
  
  int
@@ -187,10 +187,10 @@
      RepoTreeStat tree_st;
      char *repo_id = NULL, *file_path = NULL;
      SeafRepo *repo = NULL;
-diff --git a/src/fuse-ops.h b/src/fuse-ops.h
-index 22339a4..3dc90d9 100644
---- a/src/fuse-ops.h
-+++ b/src/fuse-ops.h
+Index: seadrive-fuse-3.0.21/src/fuse-ops.h
+===================================================================
+--- seadrive-fuse-3.0.21.orig/src/fuse-ops.h
++++ seadrive-fuse-3.0.21/src/fuse-ops.h
 @@ -3,13 +3,17 @@
  
  #if defined __linux__ || defined __APPLE__
@@ -212,7 +212,7 @@
  
  int seadrive_fuse_mknod (const char *path, mode_t mode, dev_t dev);
  
-@@ -19,7 +23,7 @@ int seadrive_fuse_unlink (const char *path);
+@@ -19,7 +23,7 @@ int seadrive_fuse_unlink (const char *pa
  
  int seadrive_fuse_rmdir (const char *path);
  
@@ -221,7 +221,7 @@
  
  int seadrive_fuse_open (const char *path, struct fuse_file_info *info);
  
-@@ -31,13 +35,13 @@ int seadrive_fuse_write (const char *path, const char 
*buf, size_t size,
+@@ -31,13 +35,13 @@ int seadrive_fuse_write (const char *pat
  
  int seadrive_fuse_release (const char *path, struct fuse_file_info *fi);
  
@@ -238,10 +238,10 @@
  
  int seadrive_fuse_symlink (const char *from, const char *to);
  
-diff --git a/src/seadrive.c b/src/seadrive.c
-index 63271f3..667a64d 100644
---- a/src/seadrive.c
-+++ b/src/seadrive.c
+Index: seadrive-fuse-3.0.21/src/seadrive.c
+===================================================================
+--- seadrive-fuse-3.0.21.orig/src/seadrive.c
++++ seadrive-fuse-3.0.21/src/seadrive.c
 @@ -41,9 +41,9 @@ static void print_version ()
  #include <fcntl.h>
  #include <sys/file.h>

++++++ seadrive-fuse-3.0.18.tar.gz -> seadrive-fuse-3.0.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/configure.ac 
new/seadrive-fuse-3.0.21/configure.ac
--- old/seadrive-fuse-3.0.18/configure.ac       2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/configure.ac       2026-03-24 08:35:57.000000000 
+0100
@@ -2,7 +2,7 @@
 
 
 AC_PREREQ(2.61)
-AC_INIT([seadrive], [3.0.18], [[email protected]])
+AC_INIT([seadrive], [3.0.21], [[email protected]])
 AC_CONFIG_HEADER([config.h])
 
 AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/debian/changelog 
new/seadrive-fuse-3.0.21/debian/changelog
--- old/seadrive-fuse-3.0.18/debian/changelog   2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/debian/changelog   2026-03-24 08:35:57.000000000 
+0100
@@ -1,3 +1,15 @@
+seadrive-daemon (3.0.21) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Tue, 24 Mar 2026 10:30:00 +0800
+
+seadrive-daemon (3.0.20) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Tue, 17 Mar 2026 10:30:00 +0800
+
 seadrive-daemon (3.0.18) unstable; urgency=low
 
   * new upstream release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/filelock-mgr.c 
new/seadrive-fuse-3.0.21/src/filelock-mgr.c
--- old/seadrive-fuse-3.0.18/src/filelock-mgr.c 2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/filelock-mgr.c 2026-03-24 08:35:57.000000000 
+0100
@@ -110,8 +110,8 @@
     if (sqlite_foreach_selected_row (mgr->priv->db, sql,
                                      load_locked_files,
                                      mgr->priv->repo_locked_files) < 0) {
-        pthread_mutex_unlock (&mgr->priv->db_lock);
         pthread_mutex_unlock (&mgr->priv->hash_lock);
+        pthread_mutex_unlock (&mgr->priv->db_lock);
         g_hash_table_destroy (mgr->priv->repo_locked_files);
         return -1;
     }
@@ -243,6 +243,7 @@
     repo = seaf_repo_manager_get_repo (seaf->repo_mgr, repo_id);
     if (!repo) {
         seaf_warning ("Failed to find repo %s\n", repo_id);
+        pthread_mutex_unlock (&mgr->priv->hash_lock);
         return;
     }
 
@@ -312,8 +313,10 @@
     }
     sqlite3_finalize (stmt);
 
+    pthread_mutex_lock (&mgr->priv->hash_lock);
     locks = g_hash_table_lookup (mgr->priv->repo_locked_files, repo_id);
     if (!locks || g_hash_table_size (locks) == 0) {
+        pthread_mutex_unlock (&mgr->priv->hash_lock);
         pthread_mutex_unlock (&mgr->priv->db_lock);
         return 0;
     }
@@ -328,6 +331,11 @@
         path = ptr->data;
         info = g_hash_table_lookup (locks, path);
 
+        if (!info) {
+            seaf_warning ("BUG: empty lock info fo path %s.\n", path);
+            continue;
+        }
+
         sqlite3_bind_text (stmt, 1, repo_id, -1, SQLITE_TRANSIENT);
         sqlite3_bind_text (stmt, 2, path, -1, SQLITE_TRANSIENT);
         sqlite3_bind_int (stmt, 3, info->locked_by_me);
@@ -336,6 +344,7 @@
             seaf_warning ("Failed to insert server file lock for %.8s: %s.\n",
                           repo_id, sqlite3_errmsg (mgr->priv->db));
             sqlite3_finalize (stmt);
+            pthread_mutex_unlock (&mgr->priv->hash_lock);
             pthread_mutex_unlock (&mgr->priv->db_lock);
             return -1;
         }
@@ -347,6 +356,7 @@
     sqlite3_finalize (stmt);
     g_list_free (paths);
 
+    pthread_mutex_unlock (&mgr->priv->hash_lock);
     pthread_mutex_unlock (&mgr->priv->db_lock);
 
     return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/fuse-ops.c 
new/seadrive-fuse-3.0.21/src/fuse-ops.c
--- old/seadrive-fuse-3.0.18/src/fuse-ops.c     2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/fuse-ops.c     2026-03-24 08:35:57.000000000 
+0100
@@ -415,6 +415,9 @@
             else
                 stbuf->st_mode = S_IFREG | 0444;
         }
+        if (st.mode & 0100) {
+            stbuf->st_mode = stbuf->st_mode | 0100;
+        }
         stbuf->st_mtime = st.mtime;
         stbuf->st_nlink = 1;
         stbuf->st_uid = uid;
@@ -1699,6 +1702,11 @@
 int
 seadrive_fuse_chmod (const char *path, mode_t mode)
 {
+    RepoTreeStat tree_st;
+    char *repo_id = NULL, *file_path = NULL;
+    SeafRepo *repo = NULL;
+    JournalOp *op = NULL;
+    int ret = 0;
     FusePathComps comps;
 
     seaf_debug ("chmod %s called. mode = %o.\n", path, mode);
@@ -1709,7 +1717,52 @@
         return -ENOENT;
     }
 
-    return 0;
+    if (!comps.account_info) {
+        goto out;
+    }
+
+    if (comps.root_path != NULL ||
+        !comps.repo_type ||
+        !comps.repo_info ||
+        !comps.repo_path)
+        goto out;
+
+    repo_id = comps.repo_info->id;
+    file_path = comps.repo_path;
+
+    repo = seaf_repo_manager_get_repo (seaf->repo_mgr, repo_id);
+    if (!repo) {
+        seaf_warning ("Failed to get repo %s.\n", repo_id);
+        ret = -ENOENT;
+        goto out;
+    }
+
+    if (repo_tree_stat_path (repo->tree, file_path, &tree_st) < 0) {
+        ret = -ENOENT;
+        goto out;
+    }
+
+    if (S_ISDIR(tree_st.mode)) {
+        goto out;
+    }
+
+    if (tree_st.mode == mode)
+        goto out;
+
+    repo_tree_set_file_mode (repo->tree, file_path, mode);
+    op = journal_op_new (OP_TYPE_UPDATE_ATTR, file_path, NULL,
+                         tree_st.size, tree_st.mtime, mode);
+
+    if (journal_append_op (repo->journal, op) < 0) {
+        seaf_warning ("Failed to append op to journal of repo %s.\n", 
repo->id);
+        ret = -ENOMEM;
+        journal_op_free (op);
+    }
+
+out:
+    path_comps_free (&comps);
+    seaf_repo_unref (repo);
+    return ret;
 }
 
 int
@@ -1866,27 +1919,27 @@
     }
 
     if (!comps.account_info) {
-        ret = -EINVAL;
+        ret = -ENODATA;
         goto out;
     } else if (!comps.repo_type) {
-        ret = -EINVAL;
+        ret = -ENODATA;
         goto out;
     } else if (comps.root_path) {
-        ret = -EINVAL;
+        ret = -ENODATA;
         goto out;
     } else if (!comps.repo_info && !comps.repo_path) {
         /* Root directory */
-        ret = -EINVAL;
+        ret = -ENODATA;
         goto out;
     } else if (!comps.repo_path) {
         /* Repo directory */
-        ret = -EINVAL;
+        ret = -ENODATA;
         goto out;
     }
 
     ret = file_cache_mgr_getxattr (seaf->file_cache_mgr, comps.repo_info->id, 
comps.repo_path, name, value, size);
     if (ret < 0) {
-        ret = -ENOENT;
+        ret = -ENODATA;
         goto out;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/journal-mgr.c 
new/seadrive-fuse-3.0.21/src/journal-mgr.c
--- old/seadrive-fuse-3.0.18/src/journal-mgr.c  2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/journal-mgr.c  2026-03-24 08:35:57.000000000 
+0100
@@ -460,6 +460,7 @@
                 op->type == OP_TYPE_UPDATE_ATTR) {
                 prev_op->size = op->size;
                 prev_op->mtime = op->mtime;
+                prev_op->mode = op->mode;
             }
             journal_op_free (op);
             g_atomic_int_inc (&journal->committed_ops);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/repo-mgr.c 
new/seadrive-fuse-3.0.21/src/repo-mgr.c
--- old/seadrive-fuse-3.0.18/src/repo-mgr.c     2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/repo-mgr.c     2026-03-24 08:35:57.000000000 
+0100
@@ -1284,6 +1284,12 @@
                 ret = -1;
                 goto out;
             }
+            rc = repo_tree_set_file_mode(tree, op->path, op->mode);
+            if (rc < 0) {
+                print_apply_op_error (repo->id, op, -rc);
+                ret = -1;
+                goto out;
+            }
             break;
         default:
             seaf_warning ("Unknown op type %d, skipped.\n", op->type);
@@ -2755,6 +2761,7 @@
     g_free (account->username);
     g_free (account->nickname);
     g_free (account->token);
+    g_free (account->name);
     g_free (account->fileserver_addr);
     g_free (account->unique_id);
     g_free (account);
@@ -3535,6 +3542,7 @@
 
     pthread_rwlock_unlock (&mgr->priv->account_lock);
 
+    g_free (account_key);
     return ret;
 }
 
@@ -3569,6 +3577,7 @@
 
     pthread_rwlock_unlock (&mgr->priv->account_lock);
 
+    g_free (account_key);
     return ret;
 }
 
@@ -4540,3 +4549,25 @@
     sqlite3_free (sql);
     return array;
 }
+
+int
+seaf_repo_manager_remove_sync_error_by_err_id (SeafRepoManager *mgr, const 
char *repo_id, const char *path, int err_id)
+{
+    int ret = 0;    
+    char *sql = NULL;
+
+    if (path != NULL)
+        sql = sqlite3_mprintf ("DELETE FROM FileSyncError WHERE repo_id='%q' 
AND path='%q' AND err_id=%d",
+                               repo_id, path, err_id);
+    else
+        sql = sqlite3_mprintf ("DELETE FROM FileSyncError WHERE repo_id='%q' 
AND path IS NULL AND err_id=%d",
+                               repo_id, err_id);
+
+    pthread_mutex_lock (&mgr->priv->db_lock);
+    ret = sqlite_query_exec (mgr->priv->db, sql);
+    pthread_mutex_unlock (&mgr->priv->db_lock);
+
+    sqlite3_free (sql);
+
+    return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/repo-mgr.h 
new/seadrive-fuse-3.0.21/src/repo-mgr.h
--- old/seadrive-fuse-3.0.18/src/repo-mgr.h     2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/repo-mgr.h     2026-03-24 08:35:57.000000000 
+0100
@@ -563,4 +563,7 @@
 json_t *
 seaf_repo_manager_list_sync_errors (SeafRepoManager *mgr, int offset, int 
limit);
 
+int
+seaf_repo_manager_remove_sync_error_by_err_id (SeafRepoManager *mgr, const 
char *repo_id, const char *path, int err_id);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/repo-tree.c 
new/seadrive-fuse-3.0.21/src/repo-tree.c
--- old/seadrive-fuse-3.0.18/src/repo-tree.c    2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/repo-tree.c    2026-03-24 08:35:57.000000000 
+0100
@@ -807,6 +807,26 @@
     return 0;
 }
 
+int
+repo_tree_set_file_mode (RepoTree *tree, const char *path, guint32 mode)
+{
+    RepoTreeDirent *dirent;
+
+    pthread_rwlock_wrlock (&tree->lock);
+
+    dirent = resolve_path (tree, path);
+    if (!dirent) {
+        pthread_rwlock_unlock (&tree->lock);
+        return -1;
+    }
+
+    dirent->mode = create_mode(mode);
+
+    pthread_rwlock_unlock (&tree->lock);
+
+    return 0;
+}
+
 gboolean
 repo_tree_is_empty_repo (RepoTree *tree)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/repo-tree.h 
new/seadrive-fuse-3.0.21/src/repo-tree.h
--- old/seadrive-fuse-3.0.18/src/repo-tree.h    2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/repo-tree.h    2026-03-24 08:35:57.000000000 
+0100
@@ -77,6 +77,10 @@
                          gint64 size);
 
 int
+repo_tree_set_file_mode (RepoTree *tree, const char *path,
+                         guint32 mode);
+
+int
 repo_tree_set_file_id (RepoTree *tree, const char *path, const char *new_id);
 
 gboolean
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/rpc-service.c 
new/seadrive-fuse-3.0.21/src/rpc-service.c
--- old/seadrive-fuse-3.0.18/src/rpc-service.c  2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/rpc-service.c  2026-03-24 08:35:57.000000000 
+0100
@@ -393,6 +393,18 @@
     return seaf_sync_manager_list_sync_errors (seaf->sync_mgr);
 }
 
+int
+seafile_del_file_sync_error(const char *repo_id, const char *path, int err_id, 
GError **error)
+{
+    int ret = 0;
+    ret = seaf_repo_manager_remove_sync_error_by_err_id(seaf->repo_mgr, 
repo_id, path, err_id);
+    if (ret != 0) {
+        return ret;
+    }
+    seaf_sync_manager_remove_sync_error_by_err_id(seaf->sync_mgr, repo_id, 
path, err_id);
+    return 0;
+}
+
 static int
 seafile_cache_path (const char *repo_id, const char *path, GError **error)
 {
@@ -809,6 +821,11 @@
                                      searpc_signature_json__void());
 
     searpc_server_register_function ("seadrive-rpcserver",
+                                     seafile_del_file_sync_error,
+                                     "seafile_del_file_sync_error",
+                                     
searpc_signature_int__string_string_int());
+
+    searpc_server_register_function ("seadrive-rpcserver",
                                      seafile_cache_path,
                                      "seafile_cache_path",
                                      searpc_signature_int__string_string());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/seafile-crypt.c 
new/seadrive-fuse-3.0.21/src/seafile-crypt.c
--- old/seadrive-fuse-3.0.18/src/seafile-crypt.c        2025-11-25 
04:42:26.000000000 +0100
+++ new/seadrive-fuse-3.0.21/src/seafile-crypt.c        2026-03-24 
08:35:57.000000000 +0100
@@ -67,6 +67,7 @@
         pbkdf2_hmac_sha256 (in_len, (const guchar *)data_in, KEYGEN_ITERATION2,
                             sizeof(salt), salt, 32, key);
         pbkdf2_hmac_sha256 (32, (const guchar *)key, 10, sizeof(salt), salt, 
16, iv);
+        break;
     case 3:
         seaf_warning ("Encrypted library version %d is not supported.\n", 
version);
         return -1;
@@ -74,6 +75,7 @@
         pbkdf2_hmac_sha256 (in_len, (const guchar *)data_in, KEYGEN_ITERATION2,
                             sizeof(repo_salt_bin), repo_salt_bin, 32, key);
         pbkdf2_hmac_sha256 (32, (const guchar *)key, 10, 
sizeof(repo_salt_bin), repo_salt_bin, 16, iv);
+        break;
     default:
         seaf_warning ("Encrypted library version %d is not supported.\n", 
version);
         return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/sync-mgr.c 
new/seadrive-fuse-3.0.21/src/sync-mgr.c
--- old/seadrive-fuse-3.0.18/src/sync-mgr.c     2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/sync-mgr.c     2026-03-24 08:35:57.000000000 
+0100
@@ -31,7 +31,7 @@
 #define CHECK_LOCKED_FILES_INTERVAL 30 /* 30s */
 #define CHECK_FOLDER_PERMS_INTERVAL 30 /* 30s */
 #define MAX_RESYNC_COUNT 3
-#define CHECK_REPO_LIST_INTERVAL 1     /* 1s */
+#define CHECK_REPO_LIST_INTERVAL 30     /* 30s */
 
 #define JWT_TOKEN_EXPIRE_TIME 3*24*3600 /* 3 days */
 
@@ -699,6 +699,31 @@
     pthread_mutex_unlock (&mgr->priv->errors_lock);
 }
 
+void
+seaf_sync_manager_remove_sync_error_by_err_id (SeafSyncManager *mgr, const 
char *repo_id, const char *path, int err_id)
+{
+    GList *ptr;
+    SyncError *err;
+
+    pthread_mutex_lock (&mgr->priv->errors_lock);
+
+    for (ptr = mgr->priv->sync_errors; ptr; ptr = ptr->next) {
+        err = ptr->data;
+        if (g_strcmp0 (err->repo_id, repo_id) == 0 &&
+            g_strcmp0 (err->path, path) == 0 &&
+            err->err_id == err_id) {
+            mgr->priv->sync_errors = g_list_delete_link 
(mgr->priv->sync_errors, ptr);
+            g_free (err->repo_id);
+            g_free (err->repo_name);
+            g_free (err->path);
+            g_free (err);
+            break;
+        }
+    }
+
+    pthread_mutex_unlock (&mgr->priv->errors_lock);
+}
+
 json_t *
 seaf_sync_manager_list_sync_errors (SeafSyncManager *mgr)
 {
@@ -3326,6 +3351,9 @@
             repo_tree_set_file_size (repo->tree,
                                      de->name,
                                      de->size);
+            repo_tree_set_file_mode (repo->tree,
+                                     de->name,
+                                     de->mode);
             repo_tree_set_file_id (repo->tree, de->name, id);
 
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-3.0.18/src/sync-mgr.h 
new/seadrive-fuse-3.0.21/src/sync-mgr.h
--- old/seadrive-fuse-3.0.18/src/sync-mgr.h     2025-11-25 04:42:26.000000000 
+0100
+++ new/seadrive-fuse-3.0.21/src/sync-mgr.h     2026-03-24 08:35:57.000000000 
+0100
@@ -269,6 +269,12 @@
 seaf_repo_manager_ignored_on_commit (const char *filename);
 
 void
+seaf_sync_manager_remove_sync_error_by_err_id (SeafSyncManager *mgr,
+                                               const char *repo_id,
+                                               const char *path,
+                                               int err_id);
+
+void
 seaf_sync_manager_check_locks_and_folder_perms (SeafSyncManager *manager, 
const char *server_url);
 
 void

Reply via email to