ソースを参照

fix unpacking in BTR downloader to handle overwriting of files

Johannes Gütschow 3 ヶ月 前
コミット
9dc973b3b5
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/unfccc_ghg_data/unfccc_downloader/download_btr.py

+ 1 - 1
src/unfccc_ghg_data/unfccc_downloader/download_btr.py

@@ -162,7 +162,7 @@ if __name__ == "__main__":
                         # unlock files in folder as they might be updated by the zip
                         # unlock files in folder as they might be updated by the zip
                         # file. Sometimes a new zip file contains files with the same
                         # file. Sometimes a new zip file contains files with the same
                         # name (updated) as older zip files
                         # name (updated) as older zip files
-                        dlds.unlock(local_filename.parent / "*")
+                        dlds.unlock(local_filename.parent)
                         zipped_file = zipfile.ZipFile(str(local_filename), "r")
                         zipped_file = zipfile.ZipFile(str(local_filename), "r")
                         zipped_file.extractall(str(local_filename.parent))
                         zipped_file.extractall(str(local_filename.parent))
                         print(f"Extracted {len(zipped_file.namelist())} files.")
                         print(f"Extracted {len(zipped_file.namelist())} files.")