From ed151de19bc64a3ea7d438141f18fad2c4feaba9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 16 Oct 2017 15:02:16 +1000 Subject: [PATCH] don't die on _anki.png et al https://anki.tenderapp.com/discussions/beta-testing/747-anki-210-beta-16/page/2#comment_43769227 --- aqt/mediasrv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/mediasrv.py b/aqt/mediasrv.py index 0053be140..3cc1f50e7 100644 --- a/aqt/mediasrv.py +++ b/aqt/mediasrv.py @@ -114,9 +114,9 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler): # catch /_anki references and rewrite them to web export folder def _redirectWebExports(self, path): - targetPath = os.path.join(os.getcwd(), "_anki") + targetPath = os.path.join(os.getcwd(), "_anki", "") if path.startswith(targetPath): - newPath = os.path.join(_exportFolder, path[len(targetPath)+1:]) + newPath = os.path.join(_exportFolder, path[len(targetPath):]) return newPath return path