Skip to content

Suggestions #1

@mmattel

Description

@mmattel

First of all, THANKS 😄

  • manager.php: return new Exclude(['storage' => $storage, 'exclude' => ['.snapshot']]); should use a config.php parameter to have the needed flexibility for defining excluded path component names.
    return new Exclude(['storage' => $storage, 'exclude' => \OC::$server->getSystemConfig()->getValue('excluded_directories', []]);
  • exclude.php: private function excludedPath($path) {
    Standard strpos is not working as we do have path delimiters like / and \.
    We need to have an exact match of the search string between delimiters.
    See also the test cases in the original PR.
    And, because of Windows, path components and search string must be converted to lower case.
    Please see also original PR at
    static public function isForbiddenFileOrDir($FileOrDir, $ed = array()) { where you see what and why I did that. You just would need to remove the blacklist parts to have a working function. It also manages a non existent config.php parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions