Skip to content

Commit

Permalink
fix: extract directory
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Apr 29, 2022
1 parent 4e091c4 commit fe7a3c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jans-linux-setup/jans_setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import json
import re
import json
import tempfile

from urllib import request
from urllib.parse import urljoin, urlparse
Expand Down Expand Up @@ -129,7 +130,7 @@ def extract_setup():
jans_zip = zipfile.ZipFile(jans_zip_file)
parent_dir = jans_zip.filelist[0].orig_filename

tmp_dir = os.path.join(jans_app_dir, os.urandom(4).hex())
tmp_dir = './' + os.urandom(4).hex()
jans_zip.extractall(tmp_dir)
shutil.copytree(os.path.join(tmp_dir, parent_dir, 'jans-linux-setup/jans_setup'), argsp.setup_dir)
jans_zip.close()
Expand Down

0 comments on commit fe7a3c5

Please sign in to comment.