Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
422e78d
#816 - Add new images for ZoneHVAC:EvaporativeCoolerUnit
jmarrec Jul 7, 2025
6001f85
#816 - Add library entry ZoneHVAC:EvaporativeCoolerUnit
jmarrec Jul 7, 2025
efd560d
#816 - Add ZoneHVAC:EvaporativeCoolerUnit to hvac_library (+ delete A…
jmarrec Jul 7, 2025
75a7a95
#816 - Policy for ZoneHVAC:EvaporativeCoolerUnit
jmarrec Jul 7, 2025
d97d3a0
Unrelated but remove ZoneHVAC entries in Facility and Spaces tab, the…
jmarrec Jul 7, 2025
ba8854d
FIx #815 - Add OutputControl:ResilienceSummaries to OS App
jmarrec Jul 7, 2025
d8592d9
#799 - Add Support for AlmaLinux9
jmarrec Jul 7, 2025
9be1014
Merge pull request #822 from openstudiocoalition/799_AlmaLinux9
jmarrec Jul 8, 2025
52e83c2
Merge pull request #820 from openstudiocoalition/816_ZoneHVAC_Evapora…
jmarrec Jul 11, 2025
bdc7665
Merge pull request #821 from openstudiocoalition/815_OutputControl_Re…
jmarrec Jul 11, 2025
92929d2
Revert changes to BuildingComponentDialogCentralWidget from PR #795, …
macumber Jul 12, 2025
4fbb3a2
Merge pull request #824 from openstudiocoalition/revert_pr_795
jmarrec Jul 18, 2025
4e212b2
Bump to 1.10.0-rc2
jmarrec Jul 18, 2025
71dee14
#825 - Expose Terrain, Elevation and Keep Site Location Information o…
jmarrec Jul 19, 2025
a3155f8
Merge branch 'master' into develop
macumber Jul 19, 2025
357b26d
Use noexcept versions of filesystem (#829)
macumber Jul 24, 2025
6ced645
Merge branch 'master' into develop
macumber Jul 24, 2025
98658c2
Remove RC2 tag
macumber Jul 24, 2025
ad7061c
Fixes #831
macumber Jul 26, 2025
578272f
Another fix for #831
macumber Jul 26, 2025
5f08c17
Clang format
macumber Jul 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ endif()

# TODO: Modify the more specific variables as needed to indicate prerelease, etc
# Keep in beta in-between release cycles. Set to empty string (or comment out) for official)
set(PROJECT_VERSION_PRERELEASE "rc2")
set(PROJECT_VERSION_PRERELEASE "")

# OpenStudio version: Only include Major.Minor.Patch, eg "3.0.0", even if you have a prerelease tag
set(OPENSTUDIOAPPLICATION_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
Expand Down
14 changes: 10 additions & 4 deletions src/model_editor/PathWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@

/// constructor
PathWatcher::PathWatcher(const openstudio::path& p, int msec)
: m_enabled(true), m_exists(openstudio::filesystem::exists(p)), m_dirty(false), m_checksum(openstudio::checksum(p)), m_path(p), m_msec(msec) {
: m_enabled(true), m_exists(false), m_dirty(false), m_checksum(openstudio::checksum(p)), m_path(p), m_msec(msec) {

boost::system::error_code ec;
m_exists = openstudio::filesystem::exists(p, ec);

// make sure a QApplication exists
openstudio::Application::instance().application(false);
openstudio::Application::instance().processEvents();

const bool isDirectory =
(openstudio::filesystem::is_directory(p) || openstudio::toString(p.filename()) == "." || openstudio::toString(p.filename()) == "/");
(openstudio::filesystem::is_directory(p, ec) || openstudio::toString(p.filename()) == "." || openstudio::toString(p.filename()) == "/");
if (isDirectory) {

LOG_FREE_AND_THROW("openstudio.PathWatcher", "Watching Directory '" << openstudio::toString(p) << "' is not supported");
Expand Down Expand Up @@ -71,7 +75,8 @@ bool PathWatcher::dirty() const {
}

void PathWatcher::clearState() {
m_exists = openstudio::filesystem::exists(m_path);
boost::system::error_code ec;
m_exists = openstudio::filesystem::exists(m_path, ec);
m_dirty = false;
m_checksum = openstudio::checksum(m_path);
}
Expand All @@ -87,7 +92,8 @@ void PathWatcher::fileChanged(const QString& path) {
}

void PathWatcher::checkFile() {
bool exists = openstudio::filesystem::exists(m_path);
boost::system::error_code ec;
bool exists = openstudio::filesystem::exists(m_path, ec);
std::string checksum = openstudio::checksum(m_path);

if (checksum == "00000000") {
Expand Down
18 changes: 10 additions & 8 deletions src/openstudio_app/OpenStudioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ OpenStudioApp::OpenStudioApp(int& argc, char** argv)
std::stringstream webenginePath;
webenginePath << QCoreApplication::applicationDirPath().toStdString();
webenginePath << "/../Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess";
if (filesystem::exists(filesystem::path(webenginePath.str()))) {
boost::system::error_code ec;
if (filesystem::exists(filesystem::path(webenginePath.str()), ec)) {
setenv("QTWEBENGINEPROCESS_PATH", webenginePath.str().c_str(), true);
}

Expand Down Expand Up @@ -1102,9 +1103,10 @@ void OpenStudioApp::versionUpdateMessageBox(const osversion::VersionTranslator&
};

for (const auto& scriptfolder : scriptfolders) {
if (openstudio::filesystem::exists(scriptfolder)) {
boost::system::error_code ec;
if (openstudio::filesystem::exists(scriptfolder, ec)) {
removedScriptDirs = true;
openstudio::filesystem::remove_all(scriptfolder);
openstudio::filesystem::remove_all(scriptfolder, ec);
}
}
}
Expand Down Expand Up @@ -1149,9 +1151,7 @@ void OpenStudioApp::readSettings() {
setLastPath(settings.value("lastPath", QDir::homePath()).toString());
setDviewPath(openstudio::toPath(settings.value("dviewPath", "").toString()));
m_currLang = settings.value("language", "en").toString();
LOG_FREE(Debug, "OpenStudioApp",
"\n\n\nm_currLang=[" << m_currLang.toStdString() << "]"
<< "\n\n\n");
LOG_FREE(Debug, "OpenStudioApp", "\n\n\nm_currLang=[" << m_currLang.toStdString() << "]" << "\n\n\n");
if (m_currLang.isEmpty()) {
m_currLang = "en";
}
Expand Down Expand Up @@ -1554,7 +1554,8 @@ void OpenStudioApp::loadShoeboxModel() {

auto filePath = resourcesPath() / toPath("ShoeboxModel/ShoeboxExample.osm");
boost::optional<openstudio::model::Model> model_;
if (openstudio::filesystem::is_regular_file(filePath)) {
boost::system::error_code ec;
if (openstudio::filesystem::is_regular_file(filePath, ec)) {
model_ = versionTranslator.loadModel(filePath);
} else if (isOpenStudioApplicationRunningFromBuildDirectory()) {
filePath = getOpenStudioCoalitionMeasuresSourceDirectory() / toPath("models/ShoeboxExample.osm");
Expand Down Expand Up @@ -1714,7 +1715,8 @@ void OpenStudioApp::setDviewPath(const openstudio::path& t_dviewPath) {
LOG_FREE(Debug, "OpenStudioApp", "setDViewPath t_dviewPath is not empty.");

// check if exists?
if (openstudio::filesystem::exists(t_dviewPath) && !openstudio::filesystem::is_directory(t_dviewPath)) {
boost::system::error_code ec;
if (openstudio::filesystem::exists(t_dviewPath, ec) && !openstudio::filesystem::is_directory(t_dviewPath, ec)) {
m_dviewPath = t_dviewPath;
} else {
LOG_FREE(Error, "OpenStudioApp", "setDViewPath: t_dviewPath doesn't not appear to be valid: '" << t_dviewPath << "'.");
Expand Down
8 changes: 4 additions & 4 deletions src/openstudio_app/Resources/default/hvac_library.osm
Original file line number Diff line number Diff line change
Expand Up @@ -2387,7 +2387,7 @@ OS:WaterHeater:Sizing,
{a5780efe-a3d2-4211-a0a1-66f758539f62}, !- WaterHeater Name
PeakDraw, !- Design Mode
0.538503, !- Time Storage Can Meet Peak Draw {hr}
0, !- Time for Tank Recovery {hr}
1, !- Time for Tank Recovery {hr}
1; !- Nominal Tank Volume for Autosizing Plant Connections {m3}

OS:WaterHeater:HeatPump,
Expand Down Expand Up @@ -2624,7 +2624,7 @@ OS:WaterHeater:Sizing,
{db2fa640-2a72-4846-9027-769207ea3ebf}, !- WaterHeater Name
PeakDraw, !- Design Mode
0.538503, !- Time Storage Can Meet Peak Draw {hr}
0, !- Time for Tank Recovery {hr}
1, !- Time for Tank Recovery {hr}
1; !- Nominal Tank Volume for Autosizing Plant Connections {m3}

OS:WaterHeater:Mixed,
Expand Down Expand Up @@ -2677,7 +2677,7 @@ OS:WaterHeater:Sizing,
{5a6a31ef-f662-4452-925d-855d251337c0}, !- WaterHeater Name
PeakDraw, !- Design Mode
0.538503, !- Time Storage Can Meet Peak Draw {hr}
0, !- Time for Tank Recovery {hr}
1, !- Time for Tank Recovery {hr}
1; !- Nominal Tank Volume for Autosizing Plant Connections {m3}

OS:WaterHeater:HeatPump:WrappedCondenser,
Expand Down Expand Up @@ -2868,7 +2868,7 @@ OS:WaterHeater:Sizing,
{488acc4e-9be5-426c-a365-587633e98f6c}, !- WaterHeater Name
PeakDraw, !- Design Mode
0.538503, !- Time Storage Can Meet Peak Draw {hr}
0, !- Time for Tank Recovery {hr}
1, !- Time for Tank Recovery {hr}
1; !- Nominal Tank Volume for Autosizing Plant Connections {m3}

OS:Schedule:Ruleset,
Expand Down
7 changes: 3 additions & 4 deletions src/openstudio_lib/ApplyMeasureNowDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,7 @@ void ApplyMeasureNowDialog::runMeasure() {
if (OSAppBase::instance()->currentDocument()->mainWindow()->useClassicCLI()) {
arguments << "classic";
}
arguments << "run"
<< "-m"
<< "-w" << toQString(*tempWorkflowJSONPath);
arguments << "run" << "-m" << "-w" << toQString(*tempWorkflowJSONPath);
LOG(Debug, "openstudioExePath='" << toString(openstudioExePath) << "'");
LOG(Debug, "run arguments" << arguments.join(";").toStdString());

Expand All @@ -408,7 +406,8 @@ void ApplyMeasureNowDialog::displayResults() {

this->okButton()->setText(ACCEPT_CHANGES);
this->okButton()->show();
if (boost::filesystem::exists(*m_reloadPath)) {
boost::system::error_code ec;
if (boost::filesystem::exists(*m_reloadPath, ec)) {
this->okButton()->setEnabled(true);
} else {
this->okButton()->setEnabled(false);
Expand Down
16 changes: 16 additions & 0 deletions src/openstudio_lib/HVACSystemsController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <openstudio/model/ModelObject.hpp>
#include <openstudio/model/HVACComponent.hpp>
#include <openstudio/model/HVACComponent_Impl.hpp>
#include <openstudio/model/WaterHeaterMixed.hpp>
#include <openstudio/model/WaterHeaterMixed_Impl.hpp>
#include <openstudio/model/WaterHeaterSizing.hpp>
#include <openstudio/model/WaterHeaterSizing_Impl.hpp>
#include <openstudio/model/WaterToAirComponent.hpp>
#include <openstudio/model/WaterToAirComponent_Impl.hpp>
#include <openstudio/model/WaterToWaterComponent.hpp>
Expand Down Expand Up @@ -799,6 +803,18 @@ void HVACSystemsController::addToModel(AddToModelEnum addToModelEnum) {
}
case ADDTOMODEL_SHWLOOP: {
loop = model::addSHWLoop(m_model);

// issue #831
for (auto component : loop->supplyComponents()) {
if (boost::optional<model::WaterHeaterMixed> waterHeader = component.optionalCast<model::WaterHeaterMixed>()) {
model::WaterHeaterSizing waterHeaterSizing = waterHeader->waterHeaterSizing();
if (waterHeaterSizing.designMode() && waterHeaterSizing.designMode().get() == "PeakDraw") {
if (!waterHeaterSizing.timeforTankRecovery() || waterHeaterSizing.timeforTankRecovery().get() == 0) {
waterHeaterSizing.setTimeforTankRecovery(1);
}
}
}
}
break;
}
case ADDTOMODEL_SYSTEM_TYPE_3: {
Expand Down
4 changes: 3 additions & 1 deletion src/openstudio_lib/LocationTabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ void LocationView::onWeatherFileBtnClicked() {

if (!previousEPWPath.empty()) {
if (previousEPWPath.filename() != newPath.filename()) {
// inside try/catch, allow exception
if (openstudio::filesystem::exists(previousEPWPath)) {
openstudio::filesystem::remove_all(previousEPWPath);
}
Expand Down Expand Up @@ -762,7 +763,8 @@ void LocationView::onWeatherFileBtnClicked() {

} catch (...) {

openstudio::filesystem::remove_all(newPath);
boost::system::error_code ec;
openstudio::filesystem::remove_all(newPath, ec);

QMessageBox box(QMessageBox::Warning, tr("Failed To Set Weather File"), tr("Failed To Set Weather File To ") + fileName, QMessageBox::Ok);
box.setDetailedText(toQString(ss.string()));
Expand Down
33 changes: 18 additions & 15 deletions src/openstudio_lib/OSDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ OSDocument::OSDocument(const openstudio::model::Model& library, const openstudio
if (!m_savePath.isEmpty()) {
auto p = toPath(m_savePath);
modelTempDirPath = model::initializeModel(*model, p);
m_mainWindow->setWindowTitle(toQString(p.filename()) + "[*]");
m_mainWindow->setWindowFilePath(m_savePath);
m_mainWindow->setWindowTitle(m_savePath + "[*]");
} else {
modelTempDirPath = model::initializeModel(*model);
m_mainWindow->setWindowTitle("Untitled[*]");
Expand Down Expand Up @@ -930,12 +931,13 @@ bool OSDocument::fixWeatherFileInTemp(bool opening) {
epwPathAbsolute = true;

epwInUserPath = *weatherFilePath;
if (boost::filesystem::exists(epwInUserPath)) {
boost::system::error_code ec;
if (boost::filesystem::exists(epwInUserPath, ec)) {
epwInUserPathChecksum = checksum(epwInUserPath);
}

epwInTempPath = tempFilesDir / epwInUserPath.filename();
if (boost::filesystem::exists(epwInTempPath)) {
if (boost::filesystem::exists(epwInTempPath, ec)) {
epwInTempPathChecksum = checksum(epwInTempPath);
}

Expand All @@ -946,11 +948,12 @@ bool OSDocument::fixWeatherFileInTemp(bool opening) {

// Look in temp model "resources" and "resources/files"
epwInTempPath = tempResourcesDir / *weatherFilePath;
if (boost::filesystem::exists(epwInTempPath)) {
boost::system::error_code ec;
if (boost::filesystem::exists(epwInTempPath, ec)) {
epwInTempPathChecksum = checksum(epwInTempPath);
} else {
epwInTempPath = tempFilesDir / *weatherFilePath;
if (boost::filesystem::exists(epwInTempPath)) {
if (boost::filesystem::exists(epwInTempPath, ec)) {
epwInTempPathChecksum = checksum(epwInTempPath);
}
}
Expand All @@ -966,12 +969,12 @@ bool OSDocument::fixWeatherFileInTemp(bool opening) {

// Expected location is companion_folder/files
epwInUserPath = searchFilesDir / *weatherFilePath;
if (boost::filesystem::exists(epwInUserPath)) {
if (boost::filesystem::exists(epwInUserPath, ec)) {
epwInUserPathChecksum = checksum(epwInUserPath);
} else {
// Just in case, we look in the companion_folder
epwInUserPath = searchCompanionDir / *weatherFilePath;
if (boost::filesystem::exists(epwInUserPath)) {
if (boost::filesystem::exists(epwInUserPath, ec)) {
epwInUserPathChecksum = checksum(epwInUserPath);
}
}
Expand Down Expand Up @@ -1098,7 +1101,8 @@ bool OSDocument::fixWeatherFileInTemp(bool opening) {

if (doCopy) {
LOG(Debug, "Removing weather file at " << copyDest);
boost::filesystem::remove_all(copyDest);
boost::system::error_code ec;
boost::filesystem::remove_all(copyDest, ec);
LOG(Debug, "Removing weather file complete");
}

Expand Down Expand Up @@ -1510,9 +1514,10 @@ bool OSDocument::saveAs() {
// remove old model
if (!m_savePath.isEmpty()) {
openstudio::path oldModelPath = toPath(m_modelTempDir) / toPath(m_savePath).filename();
if (boost::filesystem::exists(oldModelPath)) {
boost::system::error_code ec;
if (boost::filesystem::exists(oldModelPath, ec)) {
LOG(Debug, "Removing " << oldModelPath << " starting");
boost::filesystem::remove(oldModelPath);
boost::filesystem::remove(oldModelPath, ec);
LOG(Debug, "Removing " << oldModelPath << " complete");
}
}
Expand Down Expand Up @@ -1631,8 +1636,8 @@ boost::optional<model::Component> OSDocument::getComponent(const OSItemId& itemI
}

#endif

//OS_ASSERT(openstudio::filesystem::exists(oscPath));
//std::error_code ec;
//OS_ASSERT(openstudio::filesystem::exists(oscPath, ec));

osversion::VersionTranslator translator;
//translator.setAllowNewerVersions(false); // DLM: allow to open newer versions?
Expand Down Expand Up @@ -1734,9 +1739,7 @@ void OSDocument::updateWindowFilePath() {
} else {
// m_mainWindow->setWindowTitle();
m_mainWindow->setWindowFilePath(m_savePath);
QFileInfo fi(m_savePath);
QString fileName = fi.fileName();
m_mainWindow->setWindowTitle(fileName + "[*]");
m_mainWindow->setWindowTitle(m_savePath + "[*]");
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/openstudio_lib/OSItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ OSItem* OSItem::makeItem(const OSItemId& itemId, OSItemType osItemType) {
result = new ModelObjectItem(*modelObject, itemId.isDefaulted(), osItemType);
} else {
openstudio::path p = openstudio::toPath(itemId.itemId());
if (openstudio::filesystem::exists(p)) {
boost::system::error_code ec;
if (openstudio::filesystem::exists(p, ec)) {
result = new ScriptItem(p, osItemType);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/openstudio_lib/ResultsTabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void ResultsView::searchForExistingResults(const openstudio::path& t_runDir, con
std::vector<openstudio::path> reports;

// Check that the directory does exists first
if (openstudio::filesystem::is_directory(t_runDir) && openstudio::filesystem::exists(t_runDir)) {
boost::system::error_code ec;
if (openstudio::filesystem::is_directory(t_runDir, ec) && openstudio::filesystem::exists(t_runDir, ec)) {
for (openstudio::filesystem::recursive_directory_iterator end, dir(t_runDir); dir != end; ++dir) {
openstudio::path p = *dir;
if (openstudio::toString(p.filename()) == "eplusout.sql") {
Expand All @@ -210,7 +211,7 @@ void ResultsView::searchForExistingResults(const openstudio::path& t_runDir, con
LOG(Debug, "Looking for existing results in: " << openstudio::toString(t_reportsDir));

// Check that the directory does exists first
if (openstudio::filesystem::is_directory(t_reportsDir) && openstudio::filesystem::exists(t_reportsDir)) {
if (openstudio::filesystem::is_directory(t_reportsDir, ec) && openstudio::filesystem::exists(t_reportsDir, ec)) {
for (openstudio::filesystem::directory_iterator end, dir(t_reportsDir); dir != end; ++dir) {
openstudio::path p = *dir;
if (openstudio::toString(p.extension()) == ".html" || openstudio::toString(p.extension()) == ".htm") {
Expand Down
7 changes: 3 additions & 4 deletions src/openstudio_lib/ScheduleFileInspectorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,7 @@ void ScheduleFileInspectorView::attach(openstudio::model::ScheduleFile& sch) {
m_columnSeparator->bind<std::string>(
*m_sch, static_cast<std::string (*)(const std::string&)>(&openstudio::toString),
// ScheduleFile::columnSeparatorValues does not exist: https://github.com/NREL/OpenStudio/issues/5246
[]() {
return std::vector<std::string>{"Comma", "Tab", "Space", "Semicolon"};
},
[]() { return std::vector<std::string>{"Comma", "Tab", "Space", "Semicolon"}; },
std::bind(&model::ScheduleFile::columnSeparator, m_sch.get_ptr()),
[this](const std::string& value) -> bool {
bool result = m_sch->setColumnSeparator(value);
Expand Down Expand Up @@ -424,7 +422,8 @@ void ScheduleFileInspectorView::refreshContent() {
openstudio::path fpath = m_sch->externalFile().filePath();
m_contentLines->clear();

if (openstudio::filesystem::is_regular_file(fpath)) {
boost::system::error_code ec;
if (openstudio::filesystem::is_regular_file(fpath, ec)) {
const int rowstoSkipatTop = m_sch->rowstoSkipatTop();

const int colNum = m_sch->columnNumber() - 1; // Turn 1-indexed to 0-indexed
Expand Down
7 changes: 4 additions & 3 deletions src/openstudio_lib/ScriptItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ void ScriptItem::saveArgumentsToDb() {

void ScriptItem::deleteDb() {
m_removed = true;
if (openstudio::filesystem::exists(argsDbPath())) {
openstudio::filesystem::remove(argsDbPath());
openstudio::filesystem::remove(toPath(toString((argsDbPath())) + "-journal"));
boost::system::error_code ec;
if (openstudio::filesystem::exists(argsDbPath(), ec)) {
openstudio::filesystem::remove(argsDbPath(), ec);
openstudio::filesystem::remove(toPath(toString((argsDbPath())) + "-journal"), ec);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/shared_gui_components/BCLMeasureDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ boost::optional<openstudio::BCLMeasure> BCLMeasureDialog::createMeasure() {
openstudio::path measureDir = umd / toPath(folderName);

// prompt user ???
if (openstudio::filesystem::exists(measureDir)) {
boost::system::error_code ec;
if (openstudio::filesystem::exists(measureDir, ec)) {
int i = 1;
while (openstudio::filesystem::exists(measureDir)) {
while (openstudio::filesystem::exists(measureDir, ec)) {
folderName = toQString(lowerClassName).append(" ").append(QString::number(i)).append("/");
measureDir = umd / toPath(folderName);
++i;
Expand Down
5 changes: 3 additions & 2 deletions src/shared_gui_components/WorkflowController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ void MeasureStepController::removeItemForStep(MeasureStep step) {
// remove the measure
if (canDeleteMeasure) {
boost::optional<openstudio::path> measureDir = m_app->currentModel()->workflowJSON().findMeasure(step.measureDirName());
if (measureDir && openstudio::filesystem::exists(*measureDir)) {
openstudio::filesystem::remove_all(*measureDir);
boost::system::error_code ec;
if (measureDir && openstudio::filesystem::exists(*measureDir, ec)) {
openstudio::filesystem::remove_all(*measureDir, ec);
}
}

Expand Down
Loading