From: Magnus Hagander Date: Thu, 4 Sep 2025 19:25:16 +0000 (+0200) Subject: Properly strip newlines at end of filename X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a17e2bc4c5c8e1abef41a28be1580631a0f3f597;p=pgweb.git Properly strip newlines at end of filename --- diff --git a/tools/purgehook/purgehook.py b/tools/purgehook/purgehook.py index 73550dc1..53be5188 100755 --- a/tools/purgehook/purgehook.py +++ b/tools/purgehook/purgehook.py @@ -49,7 +49,7 @@ if __name__ == "__main__": }) # If it's a CSS file, we also need to purge /dyncss/ - if l.endswith('.css'): + if l.strip().endswith('.css'): curs.execute("SELECT varnish_purge('^/dyncss/')") elif l.startswith('data/'): # Data files map to xkeys with the same name as the file prefixed by data_