diff options
author | Greg Ward <gward@python.net> | 2000-05-20 16:05:34 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-05-20 16:05:34 (GMT) |
commit | 4355093f94299572498d31fa50eec38df721cadb (patch) | |
tree | 610b94562623362cf3f524190d7953f2f8015f2d /Lib/distutils/file_util.py | |
parent | a4adafd55b870fbd08b876b10eb2f64903039a57 (diff) | |
download | cpython-4355093f94299572498d31fa50eec38df721cadb.zip cpython-4355093f94299572498d31fa50eec38df721cadb.tar.gz cpython-4355093f94299572498d31fa50eec38df721cadb.tar.bz2 |
Tweaked output of 'copy_file()': if copying to a new name, show the whole
destination path, otherwise show just the directory.
Diffstat (limited to 'Lib/distutils/file_util.py')
-rw-r--r-- | Lib/distutils/file_util.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/distutils/file_util.py b/Lib/distutils/file_util.py index 3224510..a73db42 100644 --- a/Lib/distutils/file_util.py +++ b/Lib/distutils/file_util.py @@ -90,7 +90,7 @@ def copy_file (src, dst, (os.symlink) instead of copying: set it to "hard" or "sym"; if it is None (the default), files are copied. Don't set 'link' on systems that don't support it: 'copy_file()' doesn't check if - hard or symbolic linking is availalble. + hard or symbolic linking is available. Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file @@ -131,8 +131,11 @@ def copy_file (src, dst, raise ValueError, \ "invalid value '%s' for 'link' argument" % link if verbose: - print "%s %s -> %s" % (action, src, dir) - + if os.path.basename(dst) == os.path.basename(src): + print "%s %s -> %s" % (action, src, dir) + else: + print "%s %s -> %s" % (action, src, dst) + if dry_run: return 1 |