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

Check for read-only input file before dying with an error #1

Open
ssokolow opened this issue Aug 29, 2017 · 0 comments
Open

Check for read-only input file before dying with an error #1

ssokolow opened this issue Aug 29, 2017 · 0 comments

Comments

@ssokolow
Copy link
Owner

Saves copied off a cartridge via the Retrode will have their mode bits set to 444 (r--r--r--) on Linux.

This has the annoying side-effect that, if saveswap is run on them, you're likely to wind up with the following set of steps:

  1. Naively run saveswap on the file.
  2. It dies with an error.
  3. chmod the file writable
  4. Re-run saveswap.
  5. It dies because the previous run left a read-only backup file that it can't overwrite.

Saveswap should either detect this an exit before creating the backup or set the appropriate permissions for you. (I'll need to think about what would provide the best balance for use in scripts and non-scripted use.)

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

No branches or pull requests

1 participant