ソースを参照

Bug fix: Browsing long paths was broken by 9a54ec5f (Using large fetch and not reading short names when reading directories for file panel)

Would add \\? prefix to tree and drive combobox

Source commit: 7b862e177adf09600a200921dec1d4f1e055b049
Martin Prikryl 1 年間 前
コミット
5635eeddf0
1 ファイル変更6 行追加0 行削除
  1. 6 0
      source/packages/filemng/DirView.pas

+ 6 - 0
source/packages/filemng/DirView.pas

@@ -811,6 +811,8 @@ begin
 end;
 
 procedure TDirView.SetPath(Value: string);
+const
+  LongPathPrefix = '\\?\';
 var
   LongPath: string;
   Len: Integer;
@@ -831,7 +833,11 @@ begin
     SetLength(LongPath, Len);
     Len := GetLongPathName(PChar(ApiPath(Value)), PChar(LongPath), Len);
     if Len > 0 then
+    begin
       Value := Copy(LongPath, 1, Len);
+      if StartsStr(LongPathPrefix, Value) then
+        System.Delete(Value, 1, Length(LongPathPrefix));
+    end;
   end;
 
   CheckCanOpenDirectory(Value);