mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-08 11:57:44 +08:00
Fix SQL to query NULL path in file sync error db.
This commit is contained in:
parent
3d32fb5ed2
commit
24e2eeb04b
@ -680,8 +680,12 @@ seaf_repo_manager_record_sync_error (const char *repo_id,
|
||||
|
||||
pthread_mutex_lock (&seaf->repo_mgr->priv->db_lock);
|
||||
|
||||
sql = sqlite3_mprintf ("DELETE FROM FileSyncError WHERE repo_id='%q' AND path='%q'",
|
||||
repo_id, path);
|
||||
if (path != NULL)
|
||||
sql = sqlite3_mprintf ("DELETE FROM FileSyncError WHERE repo_id='%q' AND path='%q'",
|
||||
repo_id, path);
|
||||
else
|
||||
sql = sqlite3_mprintf ("DELETE FROM FileSyncError WHERE repo_id='%q' AND path IS NULL",
|
||||
repo_id);
|
||||
ret = sqlite_query_exec (seaf->repo_mgr->priv->db, sql);
|
||||
sqlite3_free (sql);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user