فهرست منبع

Avoiding ambiguity with global variable

(cherry picked from commit 229063ae04ce98444d2c505847693f603cefa878)

Source commit: 5ce6f13038b4fd0968d4b021e1031d58433f9767
Martin Prikryl 4 سال پیش
والد
کامیت
11e928c925
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      source/packages/filemng/DriveView.pas

+ 7 - 7
source/packages/filemng/DriveView.pas

@@ -1043,7 +1043,7 @@ var
   Drive: string;
   Drive: string;
   OldSerial: DWORD;
   OldSerial: DWORD;
   NewDir: string;
   NewDir: string;
-  LastDrive: string;
+  PrevDrive: string;
 begin
 begin
   if not Reading and not (csRecreating in ControlState) then
   if not Reading and not (csRecreating in ControlState) then
   begin
   begin
@@ -1054,9 +1054,9 @@ begin
       begin
       begin
         Drive := DriveInfo.GetDriveKey(NewDir);
         Drive := DriveInfo.GetDriveKey(NewDir);
         if Length(FLastDir) > 0 then
         if Length(FLastDir) > 0 then
-          LastDrive := DriveInfo.GetDriveKey(FLastDir)
+          PrevDrive := DriveInfo.GetDriveKey(FLastDir)
         else
         else
-          LastDrive := '';
+          PrevDrive := '';
 
 
         FChangeFlag := True;
         FChangeFlag := True;
         FLastDir := NewDir;
         FLastDir := NewDir;
@@ -1078,12 +1078,12 @@ begin
 
 
             GetDriveStatus(Drive).DefaultDir := IncludeTrailingBackslash(NewDir);
             GetDriveStatus(Drive).DefaultDir := IncludeTrailingBackslash(NewDir);
 
 
-            if LastDrive <> Drive then
+            if PrevDrive <> Drive then
             begin
             begin
-              if (LastDrive <> '') and
-                 (DriveInfo.Get(LastDrive).DriveType = DRIVE_REMOVABLE) then
+              if (PrevDrive <> '') and
+                 (DriveInfo.Get(PrevDrive).DriveType = DRIVE_REMOVABLE) then
               begin
               begin
-                TerminateWatchThread(LastDrive);
+                TerminateWatchThread(PrevDrive);
               end;
               end;
 
 
               {Drive serial has changed or is missing: allways reread the drive:}
               {Drive serial has changed or is missing: allways reread the drive:}