Issue 32247: shutil-copytree: Create dst folder only if it doesn't exist (original) (raw)
Issue32247
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/76428
classification
Title: | shutil-copytree: Create dst folder only if it doesn't exist | ||
---|---|---|---|
Type: | behavior | Stage: | resolved |
Components: | Versions: |
process
Status: | closed | Resolution: | not a bug |
---|---|---|---|
Dependencies: | Superseder: | add exist_ok to shutil.copytree View:20849 | |
Assigned To: | Nosy List: | rst0py, takluyver | |
Priority: | normal | Keywords: |
Created on 2017-12-07 20:56 by rst0py, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 4751 | closed | rst0py,2017-12-07 20:56 |
Messages (2) | ||
---|---|---|
msg307823 - (view) | Author: Radostin (rst0py) | Date: 2017-12-07 20:56 |
shutil.copytree method always tries to create the destination directory which raises the error message "OSError: [Errno 17] File exists". This issue has been discussed here: https://stackoverflow.com/questions/1868714/how-do-i-copy-an-entire-directory-of-files-into-an-existing-directory-using-pyth | ||
msg307845 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2017-12-08 10:46 |
This is documented: > The destination directory, named by dst, must not already exist https://docs.python.org/3/library/shutil.html#shutil.copytree I guess that avoids complications that might arise from merging a directory. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:55 | admin | set | github: 76428 |
2017-12-09 03:47:52 | martin.panter | set | superseder: add exist_ok to shutil.copytree |
2017-12-08 10:51:19 | rst0py | set | status: open -> closedresolution: not a bugstage: resolved |
2017-12-08 10:46:27 | takluyver | set | nosy: + takluyvermessages: + |
2017-12-07 20:56:56 | rst0py | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements