mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Merge pull request #106 from Rid/patch-1
Fix mistaking socket files for directories
This commit is contained in:
commit
a9a5698cac
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ class NativeFileInfo implements IFileInfo {
|
||||||
public function isDirectory(): bool {
|
public function isDirectory(): bool {
|
||||||
$mode = $this->getMode();
|
$mode = $this->getMode();
|
||||||
if ($mode > 0x1000) {
|
if ($mode > 0x1000) {
|
||||||
return (bool)($mode & 0x4000); // 0x4000: unix directory flag
|
return ($mode & 0x4000 && !($mode & 0x8000)); // 0x4000: unix directory flag shares bits with 0xC000: socket
|
||||||
} else {
|
} else {
|
||||||
return (bool)($mode & IFileInfo::MODE_DIRECTORY);
|
return (bool)($mode & IFileInfo::MODE_DIRECTORY);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue