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

Suggestions #1

Open
mmattel opened this issue Oct 6, 2016 · 3 comments
Open

Suggestions #1

mmattel opened this issue Oct 6, 2016 · 3 comments

Comments

@mmattel
Copy link

mmattel commented Oct 6, 2016

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.
@mmattel
Copy link
Author

mmattel commented Nov 7, 2016

Hello @rullzer, do you have any news on that?
When thinking about to use nextcloud, this is a very important functionality...

@rullzer
Copy link
Member

rullzer commented Nov 10, 2016

This was just a proof of concept. Feel free to fork.

@jospoortvliet
Copy link
Member

This is revived and moved in the Nextcloud repo 🎉 🎂

@mmattel if you could have a look perhaps at how to do what you propose, help would be super welcome... Doing this in a more sustainable way seems the right way to go of course.

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

No branches or pull requests

3 participants