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

Updated isWritable #381

Merged
merged 9 commits into from
Feb 21, 2024

Conversation

Dashboy1998
Copy link
Contributor

Context

Choices

  • Since [ -w path ] won't work if a directory is writable but not delete-able we check if it is a directory and if so then try to create a temporary file.

Test instructions

  1. Start normally. If this works then isWritable works for files and directories that are writable.
  2. Verify the function still works for files that are not writable: chmod 444 palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  3. Verify the function still works for directories that are writable and delete-able: chmod 444 palworld/Pal/Saved/Config/LinuxServer/
  4. Verify the function works for directories that are writable but not delete-able

Checklist before requesting a review

  • I have performed a self-review of my code
  • I've added documentation about this change to the README.
  • I've not introduced breaking changes.

@Dashboy1998
Copy link
Contributor Author

@acmcarther can you test if this resolves your issue? I am unable to test as I do not have an NFS.

@thijsvanloef thijsvanloef merged commit 0f02311 into thijsvanloef:main Feb 21, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting until author responds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isWritable check requires that the root directory be deletable ("/palworld is not writable")
2 participants