When uploading files through WebDAV, a part file is created and a rename
operation is performed with the expectation that the part file
overwrites an existing file, if any.
This fix makes the SMB external storage delete the target file before
renaming, as smbclient doesn't support overwrite on move/rename.
Fixes#5348
When NetBIOS is blocked or disabled, a smb::look() call can still get
the list of shares from smbclient, even though the name resolution at
the end of the command fails.
This fix makes it ignore the connection error if we already got the list
of shares.
Fixed#5860
The stream_fseek function must return a boolean which will be mapped
to 0 for success and -1 for failure for the caller.
This patch fixes stream_fseek of smb4php to also respect this
convention.
Since the encryption app is relying on fseek to detect whether a file is
encrypted by reading the last bit of data, this will fix#5023