3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

auto-t: allow copy_to_storage to copy directories

This commit is contained in:
James Prestwood 2019-06-27 08:57:33 -07:00 committed by Denis Kenzior
parent 25ec69b358
commit 1a2f10dacd

View File

@ -960,7 +960,11 @@ class IWD(AsyncOpAbstract):
import shutil
assert not os.path.isabs(source)
shutil.copy(source, IWD_STORAGE_DIR)
if os.path.isdir(source):
shutil.copytree(source, IWD_STORAGE_DIR + "/%s" % source)
else:
shutil.copy(source, IWD_STORAGE_DIR)
@staticmethod
def remove_from_storage(file_name):