Fixed two bugs that cropped up in previous commit.
This commit is contained in:
parent
92bbf16a1e
commit
1b898edf2c
|
@ -46,12 +46,12 @@ for arg in sys.argv[2:]:
|
||||||
elif state == 'tri':
|
elif state == 'tri':
|
||||||
if arg[-1:] == '/':
|
if arg[-1:] == '/':
|
||||||
tris.append(arg)
|
tris.append(arg)
|
||||||
else
|
else:
|
||||||
tris.append(arg + '/')
|
tris.append(arg + '/')
|
||||||
elif state == 'vrac':
|
elif state == 'vrac':
|
||||||
if arg[-1:] == '/':
|
if arg[-1:] == '/':
|
||||||
vracs.append(arg)
|
vracs.append(arg)
|
||||||
else
|
else:
|
||||||
vracs.append(arg + '/')
|
vracs.append(arg + '/')
|
||||||
else:
|
else:
|
||||||
help()
|
help()
|
||||||
|
|
|
@ -85,7 +85,7 @@ def update(connection,cursor,path):
|
||||||
print "commit!"
|
print "commit!"
|
||||||
|
|
||||||
print "cleaning up..."
|
print "cleaning up..."
|
||||||
likepath=('' + path).replace('%', '%%') + '%';
|
likepath=((path + '') if (path[-1:] == '/') else (path + '/')).replace('%', '%%') + '%';
|
||||||
cursor.execute("create temp table deletedfiles(path)")
|
cursor.execute("create temp table deletedfiles(path)")
|
||||||
cursor.execute("create index i_deletedfiles_path on deletedfiles(path)")
|
cursor.execute("create index i_deletedfiles_path on deletedfiles(path)")
|
||||||
cursor.execute("insert into deletedfiles(path) select path from files where path like ?", (likepath,));
|
cursor.execute("insert into deletedfiles(path) select path from files where path like ?", (likepath,));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user