[Pkg-owncloud-commits] [ocsync] 02/09: inode 0 is invalid: don't try to match it from a DB
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sun Dec 8 21:51:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository ocsync.
commit 60636cdbd5ee03c6f1c253a3d9989cd07b13359e
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Tue Dec 3 12:51:18 2013 +0100
inode 0 is invalid: don't try to match it from a DB
Otherwise, a new file with an invalid inode is considered like a rename
of another file with an invalid inode
---
src/csync_statedb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/csync_statedb.c b/src/csync_statedb.c
index 827cd9c..0f1e2d5 100644
--- a/src/csync_statedb.c
+++ b/src/csync_statedb.c
@@ -482,6 +482,10 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(sqlite3 *db,
char *stmt = NULL;
size_t len = 0;
+ if (!inode) {
+ return NULL;
+ }
+
stmt = sqlite3_mprintf("SELECT * FROM metadata WHERE inode='%lld'",
(long long signed int) inode);
if (stmt == NULL) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/ocsync.git
More information about the Pkg-owncloud-commits
mailing list