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 preview generator trying to recreate an existing folder #32315

Merged
merged 1 commit into from
May 10, 2022

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented May 9, 2022

Fix nextcloud/previewgenerator#289

The call to $file->getId() might throw a NotFoundException which is interpreted as a missing directory in the try/catch block. The catch block then tried to recreate the directory even though it's already existing.

This patch was tested by the community via nextcloud/previewgenerator#289 (comment) and nextcloud/previewgenerator#289 (comment)

@st3iny st3iny added this to the Nextcloud 25 milestone May 9, 2022
@st3iny st3iny requested a review from a team May 9, 2022 15:02
@st3iny st3iny self-assigned this May 9, 2022
@st3iny
Copy link
Member Author

st3iny commented May 9, 2022

/backport to stable24

@st3iny
Copy link
Member Author

st3iny commented May 9, 2022

/backport to stable23

@st3iny
Copy link
Member Author

st3iny commented May 9, 2022

/backport to stable22

lib/private/Preview/Generator.php Show resolved Hide resolved
lib/private/Preview/Generator.php Show resolved Hide resolved
@come-nc come-nc self-requested a review May 9, 2022 15:24
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny force-pushed the fix/noid/preview-duplicate-folder-creation branch from bb0a69b to 982c846 Compare May 9, 2022 15:30
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 10, 2022
@skjnldsv skjnldsv merged commit 0863a3d into master May 10, 2022
@skjnldsv skjnldsv deleted the fix/noid/preview-duplicate-folder-creation branch May 10, 2022 08:11
@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

st3iny added a commit that referenced this pull request May 10, 2022
Backport of #32315

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

@nextcloud nextcloud deleted a comment from backportbot-nextcloud bot May 10, 2022
@nextcloud nextcloud deleted a comment from backportbot-nextcloud bot May 10, 2022
st3iny added a commit that referenced this pull request May 10, 2022
Backport of #32315

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish feature: previews and thumbnails
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCP\Files\NotPermittedException Could not create folder
4 participants