1
0
Эх сурвалжийг харах

Moving variables declaration closer to use

Source commit: 8b489b040ce18ae109ea57b9d5705f89b4f7e686
Martin Prikryl 8 жил өмнө
parent
commit
0070f40e4c

+ 2 - 2
source/core/FtpFileSystem.cpp

@@ -2514,8 +2514,6 @@ bool __fastcall TFTPFileSystem::SupportsReadingFile()
 void __fastcall TFTPFileSystem::ReadFile(const UnicodeString FileName,
   TRemoteFile *& File)
 {
-  UnicodeString Path = UnixExtractFilePath(FileName);
-  UnicodeString NameOnly = UnixExtractFileName(FileName);
   TRemoteFile *AFile = NULL;
   bool Own;
   if (SupportsReadingFile())
@@ -2534,6 +2532,8 @@ void __fastcall TFTPFileSystem::ReadFile(const UnicodeString FileName,
     }
     else
     {
+      UnicodeString Path = UnixExtractFilePath(FileName);
+      UnicodeString NameOnly = UnixExtractFileName(FileName);
       // FZAPI does not have efficient way to read properties of one file.
       // In case we need properties of set of files from the same directory,
       // cache the file list for future