Skip to content

Commit

Permalink
Merge pull request #123 from ImogenBits/fix_move
Browse files Browse the repository at this point in the history
use shutil.move instead of Path.rename
  • Loading branch information
Benezivas authored Sep 23, 2023
2 parents baf89ba + 8ed1b94 commit 2cfd043
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion algobattle/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing_extensions import override
from importlib.metadata import version as pkg_version
from zipfile import ZipFile
import shutil

from anyio import run as run_async_fn
from pydantic import Field, ValidationError
Expand Down Expand Up @@ -298,7 +299,7 @@ def init(
file.unlink()
elif (dir := target / path.name).is_dir():
rmtree(dir)
path.rename(target / path.name)
shutil.move(path, target / path.name)
console.print("Unpacked problem data")
else:
parsed_config = AlgobattleConfig.from_file(target, relativize_paths=False)
Expand Down

0 comments on commit 2cfd043

Please sign in to comment.