mirror of
https://github.com/samba-team/samba.git
synced 2025-12-23 00:23:53 +03:00
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>
This commit is contained in:
committed by
Andrew Bartlett
parent
454d8148a6
commit
b3799fb6e6
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user