Skip to content
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

fix(files): Don't fail if dir exists #45413

Merged
merged 2 commits into from
May 30, 2024
Merged

fix(files): Don't fail if dir exists #45413

merged 2 commits into from
May 30, 2024

Conversation

solracsf
Copy link
Member

@solracsf solracsf commented May 21, 2024

Summary

In some cases, mkdir is returning false because directory already exists on disk (race condition?)
Nevertheless, we shouldn't need to throw if folder exists.

Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create folder \"/appdata_ocwfs52oscxg/preview/5/e/8/b/b/c/e/3685938\

Checklist

@solracsf solracsf added the 3. to review Waiting for reviews label May 21, 2024
@solracsf solracsf added this to the Nextcloud 30 milestone May 21, 2024
@solracsf solracsf self-assigned this May 21, 2024
@solracsf solracsf requested review from a team, ArtificialOwl, icewind1991 and yemkareems and removed request for a team May 22, 2024 08:15
@solracsf solracsf requested a review from Altahrim May 22, 2024 15:26
solracsf and others added 2 commits May 30, 2024 14:27
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@susnux susnux merged commit 48e6240 into master May 30, 2024
154 of 155 checks passed
@susnux susnux deleted the createIfNotExists branch May 30, 2024 17:45
@solracsf
Copy link
Member Author

/backport to stable29

@solracsf
Copy link
Member Author

/backport to stable28

@solracsf solracsf changed the title fix(files): Try to create dir only if it not exists fix(files): Don't fail if dir exists May 30, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants