Browse Source

FIX: Build under Windows

Alexander Koblov 9 years ago
parent
commit
75c2c01351
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/fmain.pas

+ 3 - 1
src/fmain.pas

@@ -1393,11 +1393,13 @@ var
   AFile: TFile;
   AFiles: TFiles;
   APoint: TPoint;
+  AFileName: String;
 begin
 {$IF DEFINED(MSWINDOWS)}
   if Button = mbRight then
   try
-    AFile:= TFileSystemFileSource.CreateFileFromFile(ShellTreeView.Path);
+    AFileName:= ExcludeTrailingBackslash((ShellTreeView as TShellTreeView).Path);
+    AFile:= TFileSystemFileSource.CreateFileFromFile(AFileName);
     try
       AFiles:= TFiles.Create(AFile.Path);
       AFiles.Add(AFile);