mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
adding tempdir back
This commit is contained in:
parent
b815cf38a8
commit
deeff1717b
@ -780,11 +780,9 @@ class Helpers:
|
|||||||
.format(os.path.join(folder, filename), os.path.join(folder, filename), os.path.join(folder, filename), os.path.join(folder, filename), filename, os.path.join(folder, filename), os.path.join(folder, filename), filename, filename)
|
.format(os.path.join(folder, filename), os.path.join(folder, filename), os.path.join(folder, filename), os.path.join(folder, filename), filename, os.path.join(folder, filename), os.path.join(folder, filename), filename, filename)
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def unzipServer(self, zip_path, user_id):
|
@staticmethod
|
||||||
temp_uuid = str(uuid.uuid4()) + 'temp'
|
def unzipServer(zip_path, user_id):
|
||||||
servers_path = str(self.get_servers_root_dir())
|
tempDir = tempfile.mkdtemp()
|
||||||
tempDir = os.path.join(servers_path, temp_uuid)
|
|
||||||
os.mkdir(tempDir)
|
|
||||||
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
||||||
#extracts archive to temp directory
|
#extracts archive to temp directory
|
||||||
zip_ref.extractall(tempDir)
|
zip_ref.extractall(tempDir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user