Skip to content

Commit 9863b8e

Browse files
committed
fix so hitting cancel in dialog cancels installation
1 parent 78749d0 commit 9863b8e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -609,23 +609,22 @@ public static void InstallDCCIntegration ()
609609
throw new System.NotImplementedException ();
610610
}
611611

612-
GetIntegrationFolder (dccIntegration);
612+
if (!GetIntegrationFolder (dccIntegration)) {
613+
// failed to get integration folder
614+
return;
615+
}
613616
int exitCode = dccIntegration.InstallIntegration (dccExe);
614617
ShowSuccessDialog (dccIntegration.DccDisplayName, exitCode);
615618
}
616619

617-
private static void GetIntegrationFolder(DCCIntegration dcc){
620+
private static bool GetIntegrationFolder(DCCIntegration dcc){
618621
// decompress zip file if it exists, otherwise try using default location
619622
var zipPath = dcc.GetIntegrationZipFullPath();
620623
if (System.IO.File.Exists (zipPath)) {
621-
var result = DecompressIntegrationZipFile (zipPath, dcc);
622-
if (!result) {
623-
// could not find integration
624-
return;
625-
}
626-
} else {
627-
dcc.SetIntegrationFolderPath (DefaultIntegrationSavePath);
624+
return DecompressIntegrationZipFile (zipPath, dcc);
628625
}
626+
dcc.SetIntegrationFolderPath (DefaultIntegrationSavePath);
627+
return true;
629628
}
630629

631630
private static bool DecompressIntegrationZipFile(string zipPath, DCCIntegration dcc)

0 commit comments

Comments
 (0)