Merge pull request #3 from Xenopathic/patch-1

Fix errno comparison
This commit is contained in:
icewind1991 2014-07-15 16:07:30 +02:00
commit 32f54c925b

View file

@ -96,7 +96,7 @@ class NativeShare implements IShare {
throw new AlreadyExistsException($errstr); throw new AlreadyExistsException($errstr);
} else if (strpos($errstr, 'Can\'t write to a directory') or } else if (strpos($errstr, 'Can\'t write to a directory') or
strpos($errstr, 'use rmdir instead') or strpos($errstr, 'use rmdir instead') or
$errno = 20 // 20: ENOTDIR $errno === 20 // 20: ENOTDIR
) { ) {
throw new InvalidTypeException($errstr); throw new InvalidTypeException($errstr);
} else if (strpos($errstr, 'Workgroup not found') or } else if (strpos($errstr, 'Workgroup not found') or