Skip to content

Commit

Permalink
Use realpath to resolve symplinks
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Jul 26, 2014
1 parent e53541d commit 8749296
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/location.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected function toAbsolute($base, $pathArray) {
foreach ($pathArray as $path) {
// There is a little sense to make these entries absolute
if (!in_array($path, array('.', '..'))) {
$result [$path] = $base . '/' . $path;
$result [$path] = realpath($base . '/' . $path);
}
}
return $result;
Expand Down
6 changes: 3 additions & 3 deletions lib/location/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public function check() {

protected function filterOld($pathArray) {
$skip = array_values(Helper::getDirectories());
$skip[] = rtrim(App::getBackupBase(), '/');
$skip[] = \OCP\Config::getSystemValue("datadirectory", \OC::$SERVERROOT . "/data");
$skip[] = rtrim(App::getTempBase(), '/');
$skip[] = realpath(App::getBackupBase());
$skip[] = realpath(\OCP\Config::getSystemValue("datadirectory", \OC::$SERVERROOT . "/data"));
$skip[] = realpath(App::getTempBase());

// Skip 3rdparty | apps | backup | datadir | config | themes
foreach ($pathArray as $key => $path) {
Expand Down

0 comments on commit 8749296

Please sign in to comment.