Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[internal] Schedule:File relative paths mod #5010

Merged
merged 2 commits into from Oct 31, 2023

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Oct 31, 2023

Pull request overview

I'm building these changes, will hopefully report back soonish

Comment on lines +405 to +417
openstudio::path ScheduleFile_Impl::translatedFilePath() const {
if (translateFileWithRelativePath()) {
return toPath(externalFile().fileName());
}
openstudio::path filePath = externalFile().filePath();
if (!exists(filePath)) {
LOG(Warn, "Cannot find file \"" << filePath << "\"");
} else {
// make the path correct for this system
filePath = system_complete(filePath);
}
return filePath;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -5111,7 +5111,9 @@ OS:Schedule:File,
\key Yes
\key No
\default Yes
A8; \field Translate File Name
A8; \field Translate File With Relative Path
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this name more clear.

Comment on lines +5115 to +5116
\note "No" means the absolute path of the ExternalFile is resolved and translated to IDF.
\note "Yes" means only the filename (relative) is translated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jmarrec jmarrec merged commit c008154 into schedule-file-rel-path Oct 31, 2023
@jmarrec jmarrec deleted the schedule-file-rel-path-2 branch October 31, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants