Saving theme

merge-requests/30/head
Bob Mottram 2021-05-28 22:52:32 +01:00
parent 74116db628
commit 451fbd7f42
2 changed files with 2 additions and 1 deletions

View File

@ -4143,6 +4143,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.themeName):
themeDownloadPath += \
'/exports/' + self.server.themeName + '.zip'
print('submitExportTheme path=' + themeDownloadPath)
self._redirect_headers(themeDownloadPath,
cookie, callingDomain)
self.server.POSTbusy = False

View File

@ -27,7 +27,7 @@ def exportTheme(baseDir: str, theme: str) -> bool:
if os.path.isfile(exportFilename):
os.remove(exportFilename)
try:
make_archive(exportFilename, 'zip', themeDir)
make_archive(baseDir + '/exports/' + theme, 'zip', themeDir)
except BaseException:
pass
return os.path.isfile(exportFilename)