Im trying to copy directorys and files from
/var/media/KODI/connman to /storage/.cache/connman
Inside the connman folder is a file and another folder with a file inside
The problem im having is that only the folder and its file are being copied the file in the connman folder is not. the code im working on is:
drive = xbmcaddon.Addon().getSetting('Drive')
connman = ('connman/')
src_network = ('/storage/.cache/')
for file_or_dir in os.listdir(drive + connman):
path = os.path.join(drive + connman,file_or_dir)
if os.path.isdir(path):
dir = file_or_dir
src = os.path.join(drive + connman,dir)
dst = os.path.join(src_network,dir)
try:
copytree(src,dst)
except Exception as e:
log(("copytree",e,src,dst))