diff --git a/CHANGELOG.md b/CHANGELOG.md index 78837aa..834ac86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Optimize `SMBDirEntry.is_symlink()`, returned by `smbclient.scandir()` to no longer require any extra SMB calls, this object is returned by APIs such as ` * Raise exception when receiving an SMB `STATUS_STOPPED_ON_SYMLINK` response that contains no reparse buffer data * Some SMB servers like macOS do not return this information +* Fix up `smbclient.shutil.copy` and `smbclient.shutil.copy2` to properly pass along the connection `kwargs` to the internal copy call ## 1.15.0 - 2024-11-12 diff --git a/src/smbclient/shutil.py b/src/smbclient/shutil.py index 1e67fca..0948b64 100644 --- a/src/smbclient/shutil.py +++ b/src/smbclient/shutil.py @@ -452,8 +452,8 @@ def _copy(src, dst, follow_symlinks, copy_meta_func, **kwargs): if (is_remote_path(ntpath.normpath(dst)) and isdir(dst, **kwargs)) or os.path.isdir(dst): dst = _join_local_or_remote_path(dst, _basename(src)) - copyfile(src, dst, follow_symlinks=follow_symlinks) - copy_meta_func(src, dst, follow_symlinks=follow_symlinks) + copyfile(src, dst, follow_symlinks=follow_symlinks, **kwargs) + copy_meta_func(src, dst, follow_symlinks=follow_symlinks, **kwargs) return dst