mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +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
070ba2b617
commit
58703cbaba
@ -652,10 +652,17 @@ class StreamWrapper implements StreamWrapperIface
|
||||
!($this->url_stat($parent_url, STREAM_URL_STAT_QUIET)) &&
|
||||
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
|
||||
$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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user