-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Handle files with is_file
instead of file_exists
#27440
Conversation
Both resolve symlinks, and return false, if the target does not exist, btw:
EDIT: |
Here is another explanation (just in case...): |
Probably trivial enough, but @acsfer a rebase would be great, so CI checks can run through. |
Should fix things like `fread(): read of 8192 bytes failed with errno=21 Is a directory`
da52869
to
9324a74
Compare
@MichaIng rebased 👍 |
Tests need to be updated:
|
There is a second occurrence, but not sure if it is relevant here, let's see what the drone says now: https://github.com/nextcloud/server/blob/is-file-handle/tests/lib/Files/Storage/Wrapper/EncryptionTest.php#L655 |
|
/backport to stable22 |
/backport to stable21 |
/backport to stable20 |
Should fix things like
fread(): read of 8192 bytes failed with errno=21 Is a directory
sinceis_file()
will returnfalse
if the given$path
points to a directory, wherefile_exists()
will returntrue
if the given$path
points to a valid file or directory.Since we're expecting files only, this should make sense.