Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
snakeice committed Jul 24, 2019
2 parents 5c13676 + cffc002 commit 68bcfd3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core/Boss.Modules.PackageProcessor.pas
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ function TBossPackageProcessor.GetEnv(AEnv: string): string;
+ C_ENV + AEnv;
end;

procedure DeleteDirectory(const DirName: string);
var
FileOp: TSHFileOpStruct;
begin
FillChar(FileOp, SizeOf(FileOp), 0);
FileOp.wFunc := FO_DELETE;
FileOp.pFrom := PChar(DirName+#0);
FileOp.fFlags := FOF_SILENT or FOF_NOERRORUI or FOF_NOCONFIRMATION;
SHFileOperation(FileOp);
end;

procedure TBossPackageProcessor.MakeLink(AProjectPath, AEnv: string);
var
Expand All @@ -90,7 +100,7 @@ procedure TBossPackageProcessor.MakeLink(AProjectPath, AEnv: string);
begin
try
if DirectoryExists(GetEnv(AEnv)) then
TFile.Delete(GetEnv(AEnv));
DeleteDirectory(GetEnv(AEnv));

ForceDirectories(GetEnv(AEnv));

Expand Down

0 comments on commit 68bcfd3

Please sign in to comment.