-
Notifications
You must be signed in to change notification settings - Fork 107
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
Saving files fails if officer is installed read-only #549
Comments
I am not able to reproduce and it's been years that I am using it in * enterprise* context, so I am a little suspicious :)
This is from a docker on my machine - packages are in I can run your example with
I think instead the issue is in your system where you set Line 66 in bfedc49
|
The crucial part in your case is that you have the write permission for the owner of the files, so that bit will be carried over when the files are copied (by default
|
OK, I did the requested changes, is it possible for you to test? |
It looks like the problem is fixed! The current CRAN version (with the issue):
The latest Github commit:
Thank you! |
cool, thank you for taking the time to test it |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
These lines in
read_docx
:officer/R/read_docx.R
Line 97 in bfedc49
officer/R/read_docx.R
Line 113 in bfedc49
copy the respective files from the package's installation directory and then modify them before saving the output, so if Officer is installed read-only, the saving fails:
One solution would be to add
copy.mode = FALSE
to thefile.copy
calls, so that the file mode attributes are not preserved.In enterprise settings it is not uncommon to have a centralized library of packages where everything is installed read-only and maintained by designated users/teams. Another use case which is quickly gaining popularity is using Nix package manager for maintaining data science environments. Nix also installs everything read-only.
The text was updated successfully, but these errors were encountered: