diff options
| author | Garming Sam <garming@catalyst.net.nz> | 2018-05-09 15:24:38 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2018-05-12 02:09:29 +0200 |
| commit | b3799fb6e60f7b33bd5d03e4c924687a5838d968 (patch) | |
| tree | 0aee2335e5a011b7b4168df05d8b868929417f51 /python | |
| parent | 454d8148a68049a22b852ead1a3e19c1da56fc5f (diff) | |
| download | samba-b3799fb6e60f7b33bd5d03e4c924687a5838d968.tar.gz samba-b3799fb6e60f7b33bd5d03e4c924687a5838d968.tar.bz2 samba-b3799fb6e60f7b33bd5d03e4c924687a5838d968.zip | |
gpo: Ensure all files are retrieved in fetch
.ini files are normally set as hidden, and will not be found over SMB.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/netcmd/gpo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py index cd946d9fa72..42562728791 100644 --- a/python/samba/netcmd/gpo.py +++ b/python/samba/netcmd/gpo.py @@ -231,6 +231,10 @@ def parse_unc(unc): return tmp raise ValueError("Invalid UNC string: %s" % unc) +attr_flags = smb.FILE_ATTRIBUTE_SYSTEM | \ + smb.FILE_ATTRIBUTE_DIRECTORY | \ + smb.FILE_ATTRIBUTE_ARCHIVE | \ + smb.FILE_ATTRIBUTE_HIDDEN def copy_directory_remote_to_local(conn, remotedir, localdir): if not os.path.isdir(localdir): @@ -241,7 +245,7 @@ def copy_directory_remote_to_local(conn, remotedir, localdir): r_dir = r_dirs.pop() l_dir = l_dirs.pop() - dirlist = conn.list(r_dir) + dirlist = conn.list(r_dir, attribs=attr_flags) for e in dirlist: r_name = r_dir + '\\' + e['name'] l_name = os.path.join(l_dir, e['name']) |
