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

Already on GitHub? Sign in to your account

netrc should use atomic file replacement #2

danp opened this Issue Feb 23, 2012 · 1 comment


None yet
2 participants

danp commented Feb 23, 2012

Currently the library writes directly to the file that was opened. To avoid corruption issues, it should write to a temp file close to the real file and use File.rename to atomically replace the old file.

This relates to #1; the file opened with Netrc.read should probably not be replaced until it's verified the contents will be valid.

Yeap fixed that in the pull request. It should throw an exception if it can't parse what it serializes before it writes it. Upd: can't splel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment