-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Handle files with is_file instead of file_exists
#27440
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
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 directorysinceis_file()will returnfalseif the given$pathpoints to a directory, wherefile_exists()will returntrueif the given$pathpoints to a valid file or directory.Since we're expecting files only, this should make sense.