-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
questionFurther information is requestedFurther information is requestedwaiting for answerIf not answered, the issue will be closed in 7 days.If not answered, the issue will be closed in 7 days.
Description
Describe the bug
If write.xlsx is asked to write out data to a file that the user doesn't have write permissions to, it fails silently.
To Reproduce
Steps to reproduce the behavior:
> fs::file_create("foo.xlsx", mode="a=rx")
> openxlsx::write.xlsx(x=cars, file="foo.xlsx", overwrite=TRUE)
Expected behavior
It should throw an error, like write.csv does:
> fs::file_create("foo.csv", mode="a=rx")
> write.csv(cars, file="foo.csv")
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file 'foo.csv': Permission denied
This was using the latest CRAN version: 4.2.3
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requestedwaiting for answerIf not answered, the issue will be closed in 7 days.If not answered, the issue will be closed in 7 days.