Message58332
If you use shutil.move(src, dst) to move a file src to a directory dst,
the file will not be renamed into the dst directory, but rather
copied-then-removed, even if src and dst is on the same filesystem.
There are several ways to fix this:
* (The easiest) Fix the documentation for shutil.move() so that this is
mentioned.
* Fix shutil.move() so that it rename a file into a new directory.
* Change os.rename() to accept a directory as a destination for a file.
The reason for this problem is that shutil.move() tries to use
os.rename(), but fails since the destination is a directory. It then
proceeds to the copy-then-remove method, even though the documentation
gives the impression that this only happens when src and dst are on
different filesystems. |
|
| Date |
User |
Action |
Args |
| 2007-12-09 23:23:25 | init | set | spambayes_score: 0.116003 -> 0.116003 recipients:
+ init |
| 2007-12-09 23:23:25 | init | set | spambayes_score: 0.116003 -> 0.116003 messageid: <1197242604.93.0.919654384861.issue1577@psf.upfronthosting.co.za> |
| 2007-12-09 23:23:24 | init | link | issue1577 messages |
| 2007-12-09 23:23:24 | init | create | |
|