Skip to content

Win32 fixes #2

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Win32 fixes #2

wants to merge 5 commits into from

Conversation

Corion
Copy link

@Corion Corion commented Jan 5, 2024

These patches address the Win32 compatibility.

Mostly this is \r\n vs \n differences in text files, which is handling by using binmode() resp. :raw on the filehandles when reading/writing text data. This means all files only use \n as newline.

The other problem was Windows not liking open files getting renamed/overwritten. This was handled by closing
all files before they get renamed/overwritten.

https://rt.cpan.org/Public/Bug/Display.html?id=151008 can be closed.
#1 can be closed.
https://perlmonks.org/?node_id=11144340 can be updated with the resolution :)

Corion added 5 commits January 5, 2024 11:59
On Windows, renaming or overwriting an open file will fail,
so we make sure that we close all filehandles quickly because
updatedir() wants to create/overwrite CHECKSUMS
This means the files will be identical whether run on Windows
or Unixish OSes
... done under Windows but the newlines match a file
generated under a unixish OS
@DSolimano
Copy link

Thanks for banging this out, I was a bit unsure on the correct fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants