Issue 1438185: os.renames() crashes NTFS junctions (original) (raw)
Issue1438185
Created on 2006-02-24 16:03 by damiro, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg60875 - (view) | Author: Daniel Rohlfing (damiro) | Date: 2006-02-24 16:03 |
Hello There is a problem using os.renames() with a path, that was created as a ntfs junction. You will find more information about junctions and a tool to create them on: http://www.sysinternals.com/Utilities/Junction.html The source is also available there. Try this to reproduce the problem: *in DOS* mkdir C:\dir1 echo >>C:\dir1\old.txt junction.exe C:\dir2 C:\dir1 *in Python* >>> import os >>> os.renames("C:\\dir2\\old.txt", "C:\\dir2 \\new.txt") If you now look in 'dir1' you will find new.txt thats fine, but junction 'dir2' not longer exist. os.rename() is not affected by this problem. My OP is Windows 2000 [Version 5.00.2195] with SP4 and im using Python 2.4.2 I hope you will find this information usefull. greets from germany Daniel Rohlfing | ||
msg60876 - (view) | Author: Grant Olson (logistix) | Date: 2006-02-25 23:02 |
Logged In: YES user_id=699438 This is because 'os.rmdir' doesn't throw an exception when deleting a junction, since it doesn't really have any files under it. Does look like a bug to me though. | ||
msg60877 - (view) | Author: Grant Olson (logistix) | Date: 2006-02-26 23:23 |
Logged In: YES user_id=699438 Patch 1439312 posted. | ||
msg83903 - (view) | Author: Daniel Diniz (ajaksu2) * ![]() |
Date: 2009-03-21 00:36 |
Issue 1439312 has a patch. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:15 | admin | set | github: 42946 |
2009-04-05 14:10:08 | ocean-city | set | superseder: os.renames() crashes NTFS junctions -> Patch for bug 1438185: os.renames deletes junction points |
2009-04-05 14:10:08 | ocean-city | unlink | issue1438185 superseder |
2009-04-05 13:48:32 | georg.brandl | set | status: open -> closedresolution: duplicatedependencies: - os.renames() crashes NTFS junctionssuperseder: os.renames() crashes NTFS junctions |
2009-04-05 13:48:32 | georg.brandl | link | issue1438185 superseder |
2009-04-05 13:48:32 | georg.brandl | unlink | issue1438185 dependencies |
2009-03-21 00:36:39 | ajaksu2 | set | dependencies: + os.renames() crashes NTFS junctionstype: behaviorversions: + Python 2.6, Python 3.0, - Python 2.4nosy: + ajaksu2messages: + stage: test needed |
2009-03-21 00:36:39 | ajaksu2 | link | issue1438185 dependencies |
2006-02-24 16:03:03 | damiro | create |