We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8834a9 commit b0f7beeCopy full SHA for b0f7bee
src/Adapter/Local.php
@@ -343,9 +343,14 @@ public function getVisibility($path)
343
$location = $this->applyPathPrefix($path);
344
clearstatcache(false, $location);
345
$permissions = octdec(substr(sprintf('%o', fileperms($location)), -4));
346
- $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
347
-
348
- return compact('path', 'visibility');
+ $type = is_dir($location) ? 'dir' : 'file';
+
+ foreach ($this->permissionMap[$type] as $visibility => $visibilityPermissions)
349
+ if ($visibilityPermissions == $permissions)
350
+ return compact('path', 'visibility');
351
352
+ $visibility = substr(sprintf('%o', fileperms($location)), -4);
353
354
}
355
356
/**
0 commit comments