diff options
Diffstat (limited to 'atoidejouer/tools/storage.py')
-rw-r--r-- | atoidejouer/tools/storage.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/atoidejouer/tools/storage.py b/atoidejouer/tools/storage.py index d9e3cc4..9f780c1 100644 --- a/atoidejouer/tools/storage.py +++ b/atoidejouer/tools/storage.py @@ -261,17 +261,18 @@ def __merge_dir(project_name, dir_name, exist_list=None): exist_list = list() if exist_list is None else exist_list for _f in os.listdir(_path_src): # .. - _p = os.path.join(_path_src, _f) + _p_src = os.path.join(_path_src, _f) + _p_dst = os.path.join(_path_dst, _f) # little check - if os.path.isdir(_p): + if os.path.isdir(_p_src): continue # do not replace - elif os.path.exists(_p): + elif os.path.exists(_p_dst): # update exist list exist_list.append(os.path.join(dir_name, _f)) # do copy else: - shutil.copy(_p, _path_dst) + shutil.copy(_p_src, _path_dst) # OK! return True else: |