@@ -1145,7 +1145,7 @@ static psync_path_status_t psync_path_status_sync(const char *path, size_t path_
1145
1145
res = psync_sql_query_nolock ("SELECT id FROM localfolder WHERE syncid=? AND localparentfolderid=? AND name=?" );
1146
1146
psync_sql_bind_uint (res , 1 , syncid );
1147
1147
psync_sql_bind_uint (res , 2 , extract_localfolderid (folderid ));
1148
- psync_sql_bind_lstring (res , 2 , path + poff , off - poff );
1148
+ psync_sql_bind_lstring (res , 3 , path + poff , off - poff );
1149
1149
row = psync_sql_fetch_rowint (res );
1150
1150
if (!row ) {
1151
1151
psync_sql_free_result (res );
@@ -1202,8 +1202,7 @@ static psync_path_status_t psync_path_status_sync(const char *path, size_t path_
1202
1202
res = psync_sql_query_nolock ("SELECT id FROM localfolder WHERE syncid=? AND localparentfolderid=? AND name=?" );
1203
1203
psync_sql_bind_uint (res , 1 , syncid );
1204
1204
psync_sql_bind_uint (res , 2 , extract_localfolderid (folderid ));
1205
- psync_sql_bind_lstring (res , 2 , path + poff , path_len - poff );
1206
- row = psync_sql_fetch_rowint (res );
1205
+ psync_sql_bind_lstring (res , 3 , path + poff , path_len - poff );
1207
1206
if ((row = psync_sql_fetch_rowint (res ))) {
1208
1207
folderid = row [0 ];
1209
1208
psync_sql_free_result (res );
@@ -1228,7 +1227,7 @@ static psync_path_status_t psync_path_status_sync(const char *path, size_t path_
1228
1227
res = psync_sql_query_nolock ("SELECT id FROM localfile WHERE syncid=? AND localparentfolderid=? AND name=?" );
1229
1228
psync_sql_bind_uint (res , 1 , syncid );
1230
1229
psync_sql_bind_uint (res , 2 , extract_localfolderid (folderid ));
1231
- psync_sql_bind_lstring (res , 2 , path + poff , path_len - poff );
1230
+ psync_sql_bind_lstring (res , 3 , path + poff , path_len - poff );
1232
1231
if ((row = psync_sql_fetch_rowint (res ))) {
1233
1232
flags = row [0 ];
1234
1233
psync_sql_free_result (res );
0 commit comments