未验证 提交 369fe02d 编写于 作者: F Frost Ming

use shutil.move instead of os.rename

Fix #95
上级 f516cfaf
Fix a bug of moving files across different file system.
......@@ -437,7 +437,7 @@ def atomic_open_for_write(filename: Union[Path, str], *, encoding: str = "utf-8"
os.unlink(filename)
except OSError:
pass
os.rename(name, filename)
shutil.move(name, filename)
@contextmanager
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册