Message74495
| Author |
ocean-city |
| Recipients |
kristjan.jonsson, loewis, ocean-city |
| Date |
2008年10月07日.23:12:16 |
| SpamBayes Score |
4.5872217e-10 |
| Marked as misclassified |
No |
| Message-id |
<1223421138.53.0.553879031015.issue3677@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think this is stat(2) problem on windows. Please try following test
program.
#include <stdio.h>
#include <sys/stat.h>
#include <windows.h>
void test(const char *path)
{
struct stat st;
printf("%s %d %d\n", path, stat(path, &st), GetFileAttributes(path));
}
int main()
{
test("e:\\shared");
test("e:\\shared\\"); /* issue1293 */
test("e:\\shared\\a.py");
test("\\\\whiterab-c2znlh\\shared"); /* this issue */
test("\\\\whiterab-c2znlh\\shared\\");
test("\\\\whiterab-c2znlh\\shared\\a.py");
}
And this is result.
e:\shared 0 16
e:\shared\ -1 16
e:\shared\a.py 0 32
\\whiterab-c2znlh\shared -1 16
\\whiterab-c2znlh\shared\ 0 16
\\whiterab-c2znlh\shared\a.py 0 32
As discussed in issue1293, stat(2) fails for the normal folder path with
trailing slash, and also fails for the UNC folder path without trailing
slash. I'm using VC6, but same behavior on VC9?
trunk/Python/import.c(3160) and trunk/Modules/zipimport.c(99) is using
stat(2).
I'll create patch to prove my observation. :-) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年10月07日 23:12:18 | ocean-city | set | recipients:
+ ocean-city, loewis, kristjan.jonsson |
| 2008年10月07日 23:12:18 | ocean-city | set | messageid: <1223421138.53.0.553879031015.issue3677@psf.upfronthosting.co.za> |
| 2008年10月07日 23:12:17 | ocean-city | link | issue3677 messages |
| 2008年10月07日 23:12:16 | ocean-city | create |
|