View Issue Details

IDProjectCategoryView StatusLast Update
0003311Far ManagerFile Systempublic2016-09-26 15:28
Reporterpepak Assigned ToDrKnS  
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.0 
Summary0003311: Incorrect QueryDosDevice call in MatchNtPathRoot (pathmix.cpp)
DescriptionMatchNtPathRoot calls QueryDosDevice to convert a DOS drive letter to NT device name. Unfortunately, when called from internalNtQueryGetFinalPathNameByHandle (farwinapi.cpp), the device name takes the form of "C:\" in direct violation of QueryDosDevice requirements:

   The device name cannot have a trailing backslash; for example, use "C:", not "C:\".
   [ ]

This causes ConvertNameToReal (cvtname.cpp) to fail to convert most junctions*) to their proper real names, which in turn leads to ScanTree::GetNextName (scantree.cpp) to silently skip these junctions in any operation which uses the FSCANTREE_SCANSYMLINK flag. Which can easily lead to the loss of data when performing e.g. a copy with "Copy contents of symbolic links" activated.

*) Some get converted through a workaround by replacing certain \Device\something names directly.
Steps To Reproduce1) Create a HDD-like ramdisk with ImDisk ( ) as X:
2) Create a folder X:\Test and file (any content X:\Test\Test.txt).
3) Create a folder C:\Test.
4) Create junction to X:\Test in C:\Test under the name of Junction.
5) Attempt to copy C:\Test to C:\Test2 with "Copy contents of symbolic links" activated.
6) Look into C:\Test2\Junction: There will be no Test.txt.
Additional InformationRelated to and required for its fix.
TagsNo tags attached.



2016-09-24 13:58

reporter (6,569 bytes)


2016-09-24 13:59

reporter   bugnote:0014794

The attached file contains a proposed fix.


2016-09-25 17:09

administrator   bugnote:0014803



2016-09-26 14:59

reporter   bugnote:0014810

Works for my test cases.

Issue History

Date Modified Username Field Change
2016-09-24 13:58 pepak New Issue
2016-09-24 13:58 pepak File Added:
2016-09-24 13:59 pepak Note Added: 0014794
2016-09-25 16:59 DrKnS Assigned To => DrKnS
2016-09-25 16:59 DrKnS Status new => assigned
2016-09-25 17:09 DrKnS Note Added: 0014803
2016-09-25 17:09 DrKnS Status assigned => feedback
2016-09-26 14:59 pepak Note Added: 0014810
2016-09-26 14:59 pepak Status feedback => assigned
2016-09-26 15:28 DrKnS Build => 4796
2016-09-26 15:28 DrKnS Status assigned => closed
2016-09-26 15:28 DrKnS Resolution open => fixed
2016-09-26 15:28 DrKnS Fixed in Version => 3.0