Commit dfa4b89f authored by Marco Mariani's avatar Marco Mariani

slapos.xml.zip: only store file basename

parent 06ad7526
......@@ -283,7 +283,7 @@ class Computer(object):
def backup_xml(self, path_to_archive, path_to_xml):
xml_content = open(path_to_xml).read()
saved_filename = path_to_xml + time.strftime('.%Y%M%d-%H:%M')
saved_filename = os.path.basename(path_to_xml) + time.strftime('.%Y%M%d-%H:%M')
with zipfile.ZipFile(path_to_archive, 'a') as archive:
archive.writestr(saved_filename, xml_content, zipfile.ZIP_DEFLATED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment