Message118064
There are some questions.
1. About my patch, I noticed it removed following code.
Isn't this needed? I like clean code, but I don't want to
break anything.
/* Get WIN32_FIND_DATA structure for the path to determine if
it is a symlink */
if(info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
find_data_handle = FindFirstFileA(path, &find_data);
if(find_data_handle != INVALID_HANDLE_VALUE) {
if(find_data.dwReserved0 == IO_REPARSE_TAG_SYMLINK) {
/* first clear the S_IFMT bits */
result->st_mode ^= (result->st_mode & 0170000);
/* now set the bits that make this a symlink */
result->st_mode |= 0120000;
}
FindClose(find_data_handle);
}
}
/* Set S_IFEXEC if it is an .exe, .bat, ... */
dot = strrchr(path, '.');
if (dot) {
if (stricmp(dot, ".bat") == 0 || stricmp(dot, ".cmd") == 0 ||
stricmp(dot, ".exe") == 0 || stricmp(dot, ".com") == 0)
result->st_mode |= 0111;
}
2. About current behavior. when os.stat() is used for junction
(reparse point, but not simlink), returned information is
about junction on XP or earlier, but about target folder on
Vista or above. Is this intended bahavior?
Thank you. |
|
Date |
User |
Action |
Args |
2010-10-06 11:47:51 | ocean-city | set | recipients:
+ ocean-city, brian.curtin |
2010-10-06 11:47:51 | ocean-city | set | messageid: <1286365671.59.0.556119133038.issue10027@psf.upfronthosting.co.za> |
2010-10-06 11:47:50 | ocean-city | link | issue10027 messages |
2010-10-06 11:47:49 | ocean-city | create | |
|