-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Change rename function for FileSystem for Windows #8008
Conversation
…write existing file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning on merging this based on CI's success. If anyone has an issue with the changes, speak up.
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
// EnergyPlus::DataVectorTypes::Vector Unit Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally left in a comment, no reason to hold this all up for a comment though.
@@ -68,6 +68,7 @@ set( test_src | |||
FanCoilUnits.unit.cc | |||
Fans.unit.cc | |||
FaultsManager.unit.cc | |||
FileSystem.unit.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet another new unit test file, we've got to be nearly done with new unit test files. 👍
@@ -240,7 +240,12 @@ namespace FileSystem { | |||
|
|||
void moveFile(std::string const &filePath, std::string const &destination) | |||
{ | |||
#ifdef _WIN32 | |||
//Note: on Windows, rename function doesn't always replace the existing file so MoveFileExA is used | |||
MoveFileExA(filePath.c_str(), destination.c_str(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems totally fine. I'm relying on CI a little as I try to avoid building on Windows. CI is super happy with this branch, so I think this is good to go. The only caveat I can find about this function is that it is missing in the Windows Phone ™️ linkages, so if someone is planning on building E+ for embedding in their Windows phone app, we'd need to have a fallback. 😰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Myoldmopar I'll test here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reproduce the problem locally with 9.3.0 release. Confirmed that epmidf and expidf update as expected now from the base idf using this branch. Unit test runs locally. So, all good here.
Pull request overview
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.