Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exclude Directories #19235
referenced this pull request
Sep 25, 2015
(1) ... A browser popup should appear that this name is excluded and can´t be used
(1) ... A Fatal Error Message is created, the WebDav client also shows an error. But this is according to my tests not related to this PR. For details pls see #19101 (WebDav: create directory with an already existing directory name -> Fatal error)
Note : I wanted to use checkboxes in the table, but this did not work
The main problem i have left with this is the seperate in the config between "blacklisted files" and "excluded directories", I see no reason why they can't be the came config entry
$config = \OC::$server->getSystemConfig(); $excluded = $config->getValue('blacklisted_files', ['.htaccess']); $path = str_replace('\\','/', $path); $paths = explode('/', $path); return (bool) array_intersect($parts, $excluded);
should be enough
not sure about the making the blacklist case insensitive
There is a big difference between those two parameters and the meaning behind.
Excluded Directories mean, that the storage or filesystem mounted may contain folders having a part in the path name which you want to exclude from scanning (therefore the name excluded) and from an oC point of view disallow creation or viewing or renaming to with any access method. When scanning occured and the config parameter was not set but the storage or filesystem contained such directories, after setting the parameter, the must be excluded from further processing. (pls also read #16534)
Blacklisted Files mean, they are files that can be present but would impact owncloud and therefore be blacklisted.
I highly recommend keeping those two parameters seperated, because this gives admins the proper meaning what they want to do.
Note: due to time constraints I have very limited possibilities to continue on that, but would be happy if that idea would get implemented. There is a sound need for and many request made!
I'm wondering whether this would be easier using a storage wrapper and throw the exception from there for any file operation. But then it would make the exclusion relative to the storage roots instead of the user's home.
Anyway, I'm willing to take over this at some point.
Hope not blaming myself, but does this make a difference?
unit tests are badly falling apart - 89 failed tests