Skip to content

Commit

Permalink
Unable to open Check sequence #5137
Browse files Browse the repository at this point in the history
  • Loading branch information
derwin12 authored and dkulp committed Jan 25, 2025
1 parent 6519342 commit c951302
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions xLights/xLightsMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6668,19 +6668,9 @@ std::string xLightsFrame::CheckSequence(bool displayInEditor, bool writeToFile)
f.Close();

if (displayInEditor) {
wxFileType* ft = wxTheMimeTypesManager->GetFileTypeFromExtension("html");
if (ft != nullptr) {
wxString command = ft->GetOpenCommand(filename);

if (command == "") {
DisplayError(wxString::Format("Unable to show xLights Check Sequence results '%s'. See your log for the content.", filename).ToStdString(), this);
} else {
logger_base.debug("Viewing xLights Check Sequence results %s. Command: '%s'", (const char*)filename.c_str(), (const char*)command.c_str());
wxUnsetEnv("LD_PRELOAD");
wxExecute(command);
}
delete ft;
} else {
wxUnsetEnv("LD_PRELOAD");
logger_base.debug("Viewing xLights Check Sequence results %s.", (const char*)filename.c_str());
if (!wxLaunchDefaultApplication(filename)) {
DisplayError(wxString::Format("Unable to show xLights Check Sequence results '%s'. See your log for the content.", filename).ToStdString(), this);
}
}
Expand Down

0 comments on commit c951302

Please sign in to comment.