Pārlūkot izejas kodu

fixed tarball generation

master
Robin Thoni 8 gadus atpakaļ
vecāks
revīzija
b60f832352
1 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 6
    2
      vpngen.py

+ 6
- 2
vpngen.py Parādīt failu

@@ -1,3 +1,4 @@
1
+import glob
1 2
 import json
2 3
 import os
3 4
 import os.path
@@ -250,7 +251,10 @@ class VpnGen:
250 251
             dest = "%s%s-%s%s" % (client_dir, os.path.basename(split[0]), vpn_name, split[1])
251 252
             shutil.copy(file_path, dest)
252 253
 
253
-        files_names = list(map(lambda file_path: os.path.basename(file_path), files_paths))
254
+        files_names = glob.glob("%s%s*" % (client_dir, os.sep))
255
+        files_names = list(map(lambda file_path: os.path.basename(file_path), files_names))
256
+
257
+        print(files_names)
254 258
 
255 259
         call(["tar", "cfj", self.get_client_tarball_path(vpn_name, client_name),
256
-              "-C", self.get_easy_rsa_key_dir(vpn_name)] + files_names)
260
+              "-C", client_dir] + files_names)

Notiek ielāde…
Atcelt
Saglabāt