Message169990
| Author |
kaba2 |
| Recipients |
kaba2 |
| Date |
2012年09月07日.16:40:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
On Windows, long-UNC paths are needed to inspect and modify paths with more than 260 characters. The os.path.split() function behaves incorrectly in the presence of a long-UNC prefix //?/ or \\?\. Consider iterating d = os.path.split(d)[0] with d = '//?/e:/python-test/dir'. Then the values of d are as follows:
'//?/e:/python-test/dir'
'//?/e:/python-test'
'//?/e:'
'//?'
'//'
The two last splits are the incorrect ones, where the splitting should end at '//?/e:'.
One consequence of this is that os.makedirs(d) crashes, because it attempts to run os.mkdir('//') at the bottom of its recursion. The same thing happens when replacing all / with \\ in the above. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月07日 16:40:15 | kaba2 | set | recipients:
+ kaba2 |
| 2012年09月07日 16:40:15 | kaba2 | set | messageid: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> |
| 2012年09月07日 16:40:15 | kaba2 | link | issue15880 messages |
| 2012年09月07日 16:40:14 | kaba2 | create |
|