summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-03-29 03:27:45 (GMT)
committerGreg Ward <gward@python.net>2000-03-29 03:27:45 (GMT)
commit044b7c15c9209bdd51710f04ab29ce136d9db202 (patch)
tree19c4d2741eb5c16b8eeb8b2f9b3d13e057aa1f27 /Lib/distutils/util.py
parent739d06689dfd37e9233599c3fd95852bb96f71a1 (diff)
downloadcpython-044b7c15c9209bdd51710f04ab29ce136d9db202.zip
cpython-044b7c15c9209bdd51710f04ab29ce136d9db202.tar.gz
cpython-044b7c15c9209bdd51710f04ab29ce136d9db202.tar.bz2
Changed 'copy_tree()' so it returns the list of all files that were copied or
might have been copied, regardless of the 'update' flag.
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 8242e10..2729619 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -322,13 +322,14 @@ def copy_tree (src, dst,
"""Copy an entire directory tree 'src' to a new location 'dst'. Both
'src' and 'dst' must be directory names. If 'src' is not a
- directory, raise DistutilsFileError. If 'dst' does not exist, it
- is created with 'mkpath()'. The end result of the copy is that
- every file in 'src' is copied to 'dst', and directories under
- 'src' are recursively copied to 'dst'. Return the list of files
- copied (under their output names) -- note that if 'update' is true,
- this might be less than the list of files considered. Return
- value is not affected by 'dry_run'.
+ directory, raise DistutilsFileError. If 'dst' does not exist, it is
+ created with 'mkpath()'. The end result of the copy is that every
+ file in 'src' is copied to 'dst', and directories under 'src' are
+ recursively copied to 'dst'. Return the list of files that were
+ copied or might have been copied, using their output name. The
+ return value is unaffected by 'update' or 'dry_run': it is simply
+ the list of all files under 'src', with the names changed to be
+ under 'dst'.
'preserve_mode' and 'preserve_times' are the same as for
'copy_file'; note that they only apply to regular files, not to
@@ -372,10 +373,10 @@ def copy_tree (src, dst,
preserve_mode, preserve_times, preserve_symlinks,
update, verbose, dry_run))
else:
- if (copy_file (src_name, dst_name,
- preserve_mode, preserve_times,
- update, verbose, dry_run)):
- outputs.append (dst_name)
+ copy_file (src_name, dst_name,
+ preserve_mode, preserve_times,
+ update, verbose, dry_run)
+ outputs.append (dst_name)
return outputs