Skip to content

Conversation

@skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Sep 19, 2023

Fix #32177
Fix #40104

  1. If you ask for a fileid in a dir
  2. And the fileid doesn't exists in that directory
  3. BUT the file only exists in one occurrence in another directory
  4. Then redirect to that file

@skjnldsv skjnldsv added this to the Nextcloud 28 milestone Sep 19, 2023
@skjnldsv skjnldsv requested a review from a team September 19, 2023 19:01
@skjnldsv skjnldsv self-assigned this Sep 19, 2023
@skjnldsv skjnldsv requested review from ArtificialOwl, icewind1991 and nfebe and removed request for a team September 19, 2023 19:01
if ($fileid && $dir !== '') {
$baseFolder = $this->rootFolder->getUserFolder($userId);
$nodes = $baseFolder->getById((int) $fileid);
$relativePath = dirname($baseFolder->getRelativePath($nodes[0]->getPath()));

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of dirname cannot be null, possibly null value provided
@skjnldsv
Copy link
Member Author

skjnldsv commented Oct 4, 2023

Ping everyone! 🙏

@skjnldsv skjnldsv force-pushed the fix/redirect-if-wrong-dir branch from 3f0a9f2 to 1349e2a Compare October 4, 2023 06:50
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the fix/redirect-if-wrong-dir branch from 1349e2a to b05719c Compare October 4, 2023 09:29
@skjnldsv skjnldsv requested a review from max-nextcloud October 4, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: url share not working [Bug]: internal links don't seem to get resolved properly

5 participants