Conversation
Signed-off-by: Umer Tahir <umertahir6@gmail.com>
|
As per our AI Policy, the PR description needs to be human written, which this does not appear to be. So I'm closing this issue for violating the policy. If this is not the case, feel free to re-open. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
Hi, @icewind1991 , I have made the PR again with only what I wrote. I couldn't open this one may be I don't have permission. Kindly review it again. I spent good amount of time to work on this issue and in trying to contribute it into nextcloud/server for the first time. :) |
Summary
Fixes an issue in
ObjectStoreStorage::fopen()where the file extension is extracted usingstrrpos($path, '.')across the entire relative path instead ofbasename($path).Problem
When an extensionless file is located inside a folder containing a dot (e.g.
0. Projects/Subfolder/hit),$extis assigned the entire subpath string after the dot:When
TempManager::getTemporaryFile($ext)is called, directory separators are stripped:Solution
basename($path)when extracting the file extensionTests
Tested against live Nextcloud container where I had this issue during migration of data from GlusterFS to S3 (Ceph), and verified with PHPUnit in
nextcloud-docker-devenvironment.AI (if applicable)