mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 06:19:09 +01:00
* Filemanager/SMB: fix directory creation failed on Samba (smbclient PHP extension)
smbclient treats every non-zero value of $options parameter as recursive, not just &1 and we have by default &8 = STREAM_REPORT_ERRORS set.
This commit is contained in:
parent
77d2fb3060
commit
811444dc98
@ -652,10 +652,17 @@ class StreamWrapper implements StreamWrapperIface
|
|||||||
!($this->url_stat($parent_url, STREAM_URL_STAT_QUIET)) &&
|
!($this->url_stat($parent_url, STREAM_URL_STAT_QUIET)) &&
|
||||||
Vfs::parse_url($parent_url, PHP_URL_PATH) !== '/')
|
Vfs::parse_url($parent_url, PHP_URL_PATH) !== '/')
|
||||||
{
|
{
|
||||||
if (!mkdir($parent_url, $mode, $options)) return false;
|
if (!self::mkdir(Vfs::dirname($path), $mode, $options)) return false;
|
||||||
}
|
}
|
||||||
// unset it now, as it was handled above
|
// unset it now, as it was handled above
|
||||||
$options &= ~STREAM_MKDIR_RECURSIVE;
|
if (strpos($url, 'smb://') === 0)
|
||||||
|
{
|
||||||
|
$options = 0; // smbclient php extension treats every bit as recursive
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$options &= ~STREAM_MKDIR_RECURSIVE;
|
||||||
|
}
|
||||||
|
|
||||||
$ret = mkdir($url,$mode,$options);
|
$ret = mkdir($url,$mode,$options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user