浏览代码

Moving variables declaration closer to use

Source commit: 8b489b040ce18ae109ea57b9d5705f89b4f7e686
Martin Prikryl 8 年之前
父节点
当前提交
0070f40e4c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      source/core/FtpFileSystem.cpp

+ 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