Skip to content

Conversation

@selenologist
Copy link

I kept having to open a text editor to save the cart info copied to clipboard, so I just whipped up a save to file button.

Let me know if it needs any improvement. The error checking on the actual file saving part seems to work but it's a little hamfisted.

Haven't tested on any platforms other than Linux but we should be good, there's no directory characters in the path editing in this commit. I'm not sure whether the emitted file has Windows-friendly CRLF newlines, though.

@selenologist
Copy link
Author

re CRLF line endings

https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

In text mode, the default when reading is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n. When writing in text mode, the default is to convert occurrences of \n back to platform-specific line endings. This behind-the-scenes modification to file data is fine for text files, but will corrupt binary data like that in JPEG or EXE files.

So they should be CRLF when FlashGBX is run on Windows. Cool. Would be great if someone could test it though.

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.

1 participant