fix: avoid falling back to copy files when moving files in docker #237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
shutil.move()
函数是 Pythonshutil
模块中用于移动文件或目录的函数。理想情况下,它会执行一个重命名操作,这个操作非常快,因为它只需要更新元数据(比如文件名和文件在文件系统目录结构中的位置),而不需要实际复制数据。Docker 容器中的路径 ./download:/app/download 和 ./temp:/app/temp 会被 shutil.move() 判定为位于不同的文件系统,即使它们看起来都在 /download 目录下.