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

Ignore forbidden exception when fetching share mtime on SMB for symlinks #16195

Merged
merged 1 commit into from
Jul 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ private function shareMTime() {
}
} catch (NotFoundException $e) {
// Ignore this, can happen on unavailable DFS shares
} catch (ForbiddenException $e) {
// Ignore this too - it's a symlink
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My SMB knowledge is not good enough.
But is forbidden always a symlink?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it shows a folder where you don't have permissions. In general it's not really nice, because what happens if you create a folder that is already in there, but hidden in this way? On the other side: this is the code for fetching the share mtime and not the one for directory listing (which happened before then).

}
}
return $highestMTime;
Expand Down