Browse Source

Merge branch 'master' of http://192.168.1.12:3000/maixinrong/measure

builder 8 years ago
parent
commit
be3416a02f
2 changed files with 5 additions and 4 deletions
  1. 1 1
      Units/ProjectCommands.pas
  2. 4 3
      Units/ProjectData.pas

+ 1 - 1
Units/ProjectCommands.pas

@@ -1219,7 +1219,7 @@ end;
 
 function TTenderZipCompleteChecker.CheckLastPhase: Boolean;
 begin
-  Result := Assigned(FProjectData) and FProjectData.CheckPhaseFileComplete;
+  Result := Assigned(FProjectData) and FProjectData.CheckLastPhaseFileExist;
 end;
 
 function TTenderZipCompleteChecker.CheckMain: Boolean;

+ 4 - 3
Units/ProjectData.pas

@@ -531,8 +531,6 @@ begin
     FConnection.Save;
     UpdateSysProgress(190, 'ÕýÔÚ±£´æÊý¾Ý');
 
-    DeleteFileOrFolder(MainFileName);
-
     ZipFolder(FTempFolder, FileName);
     SaveInfoToManager;
     UpdateSysProgress(200, '¾ÍÐ÷');
@@ -2146,7 +2144,10 @@ end;
 
 function TProjectData.CheckLastPhaseFileExist: Boolean;
 begin
-  Result := FileExists(Format('%s\Phase%d.dat', [TempPath, FProjProperties.PhaseCount]));
+  if FProjProperties.PhaseCount > 0 then
+    Result := FileExists(Format('%s\Phase%d.dat', [TempPath, FProjProperties.PhaseCount]))
+  else
+    Result := True;
 end;
 
 end.