classification
Title: shutil.move bahave unexpected in fat32
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: grissiom, pitrou
Priority: normal Keywords:

Created on 2008-07-01 17:35 by grissiom, last changed 2008-08-09 17:05 by pitrou. This issue is now closed.

Messages (2)
msg69053 - (view) Author: grissiom (grissiom) Date: 2008-07-01 17:35
Build the environment in a fat32 file system:
$echo test > test_move
$mkdir testmove

If I shutil.move('test_move', 'testmove'), it will raise: 
Traceback (most recent call last):
  File "testmove.py", line 5, in <module>
    shutil.move('test_move', 'test_python')
  File "/usr/lib/python2.5/shutil.py", line 199, in move
    copy2(src,dst)
  File "/usr/lib/python2.5/shutil.py", line 92, in copy2
    copystat(src, dst)
  File "/usr/lib/python2.5/shutil.py", line 69, in copystat
    os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'test_python/test_move'

If I shutil.move('test_move', 'testmove/testmove'), it will succeed
quietly. This problem doesn't happen in an ext3 file system.
msg70938 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-09 17:05
This is already fixed in the trunk (which will become Python 2.6).
History
Date User Action Args
2008-08-09 17:05:28pitrousetstatus: open -> closed
resolution: fixed
messages: + msg70938
nosy: + pitrou
2008-07-01 17:35:08grissiomcreate