View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001824 | Far Manager | Drive Menu | public | 2011-07-04 11:21 | 2011-07-04 11:51 |
Reporter | Maximus | Assigned To | DrKnS | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 7 |
Product Version | 3.0 | ||||
Fixed in Version | 3.0 | ||||
Summary | 0001824: Лишний elevation в Drive menu | ||||
Description | После как в NTPath появилась "Root path must end with slash" (зачем, кстати "must"?) при запросе информации о диске CD/DVD стал появляться ненужный elevation запрос. Смысл в том, что CreateFile(L"\\\\?\\u:",... (как было раньше) отрабатывает для DVD нормально, а вот CreateFile(L"\\\\?\\u:\\",... обламывается с Access denied. | ||||
Steps To Reproduce | В дисковод (реальный или виртуальный) вставлен диск Флажок "Show CD drive parameters" включен Request administrator rights - разрешен. Жмем AltF1 получаем ненужный запрос | ||||
Tags | No tags attached. | ||||
Build | 2096 | ||||
|
cddrive0704.diff (1,041 bytes)
Index: farwinapi.cpp =================================================================== --- farwinapi.cpp (revision 6412) +++ farwinapi.cpp (working copy) @@ -464,6 +464,12 @@ FlagsAndAttributes&=~FILE_FLAG_POSIX_SEMANTICS; Handle = CreateFile(strObject, DesiredAccess, ShareMode, SecurityAttributes, CreationDistribution, FlagsAndAttributes, TemplateFile); } + else if(Error==ERROR_ACCESS_DENIED && !ForceElevation && strObject.GetLength()==7) + { + string strNoSlash(strObject); + DeleteEndSlash(strNoSlash); + Handle=CreateFile(strNoSlash, DesiredAccess, ShareMode, SecurityAttributes, CreationDistribution, FlagsAndAttributes, TemplateFile); + } } if((Handle == INVALID_HANDLE_VALUE && ElevationRequired(DesiredAccess&(GENERIC_ALL|GENERIC_WRITE|WRITE_OWNER|WRITE_DAC|DELETE|FILE_WRITE_DATA|FILE_ADD_FILE|FILE_APPEND_DATA|FILE_ADD_SUBDIRECTORY|FILE_CREATE_PIPE_INSTANCE|FILE_WRITE_EA|FILE_DELETE_CHILD|FILE_WRITE_ATTRIBUTES)?ELEVATION_MODIFY_REQUEST:ELEVATION_READ_REQUEST)) || ForceElevation) |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-07-04 11:21 | Maximus | New Issue | |
2011-07-04 11:21 | Maximus | File Added: cddrive0704.diff | |
2011-07-04 11:51 | DrKnS | Build | => 2096 |
2011-07-04 11:51 | DrKnS | Status | new => closed |
2011-07-04 11:51 | DrKnS | Assigned To | => DrKnS |
2011-07-04 11:51 | DrKnS | Resolution | open => fixed |
2011-07-04 11:51 | DrKnS | Fixed in Version | => 3.0 |