mirror of https://github.com/open-mmlab/mmocr.git
[Fix] Fix Dataset Preparer Extract (#1527)
* fix a case when re-run the preparer might repeatly download annotation * fix comments * update * fixpull/1532/head
parent
79a778689d
commit
99c86a74b8
|
@ -99,10 +99,9 @@ class NaiveDataObtainer:
|
|||
delete (bool, optional): Whether to delete the zip file. Defaults
|
||||
to False.
|
||||
"""
|
||||
|
||||
if not is_archive(src_path):
|
||||
# Move the file to the destination folder if it is not a zip
|
||||
shutil.move(src_path, dst_path)
|
||||
if not is_archive(src_path) and not osp.exists(dst_path):
|
||||
# Copy the file to the destination folder if it is not a zip
|
||||
shutil.copy(src_path, dst_path)
|
||||
return
|
||||
|
||||
zip_name = osp.basename(src_path).split('.')[0]
|
||||
|
|
Loading…
Reference in New Issue