[issue24977] shutil copy to non-existant directory

2021-02-24 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> shutil.copy raises IsADirectoryError when the directory does not actually exist ___ Python tracker

[issue24977] shutil copy to non-existant directory

2015-09-02 Thread eryksun
eryksun added the comment: Do you mean the dst path has a trailing slash, but the directory doesn't exist? shutil.copy doesn't check for a trailing slash, so it attempts to open dst as a regular file. On Linux, and probably most POSIX systems, this results in an EISDIR (is a directory) error.

[issue24977] shutil copy to non-existant directory

2015-09-01 Thread Jake Howard
New submission from Jake Howard: If you try and copy a file using shutil.copy to a directory that doesnt exist, it tries to copy the file to the location of the directory, and errors as shutil can't open a directory for 'WB' access, throwing an error, that doesnt reflect the problem.