Skip to content

Commit d97a2d8

Browse files
committed
Fix varnish purges for data/ files in subdirectories
This is not currently used, but let's generate xkeys that are actually vaild in case we ever do.
1 parent 5ba487c commit d97a2d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/purgehook/purgehook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
elif l.startswith('data/'):
5555
# Data files map to xkeys with the same name as the file prefixed by data_
5656
curs.execute("SELECT varnish_purge_xkey(%(key)s)", {
57-
'key': 'data_{}'.format(os.path.splitext(os.path.basename(l))[0]),
57+
'key': 'data_{}'.format(os.path.splitext(l[5:])[0].replace('/', '_')),
5858
})
5959
conn.commit()
6060
conn.close()

0 commit comments

Comments
 (0)