Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a392dcb2
Commit
a392dcb2
authored
Jun 23, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bastian Kleineidam: 'copy_file()' now returns the output filename, rather
than a boolean indicating whether it did the copy.
parent
f4195727
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Lib/distutils/file_util.py
Lib/distutils/file_util.py
+5
-6
No files found.
Lib/distutils/file_util.py
View file @
a392dcb2
...
...
@@ -96,9 +96,8 @@ def copy_file (src, dst,
on other systems, uses '_copy_file_contents()' to copy file
contents.
Return true if the file was copied (or would have been copied),
false otherwise (ie. 'update' was true and the destination is
up-to-date)."""
Return the name of the destination file, whether it was actually
copied or not."""
# XXX if the destination file already exists, we clobber it if
# copying, but blow up if linking. Hmmm. And I don't know what
...
...
@@ -123,7 +122,7 @@ def copy_file (src, dst,
if
update
and
not
newer
(
src
,
dst
):
if
verbose
:
print
"not copying %s (output up-to-date)"
%
src
return
0
return
dst
try
:
action
=
_copy_action
[
link
]
...
...
@@ -137,7 +136,7 @@ def copy_file (src, dst,
print
"%s %s -> %s"
%
(
action
,
src
,
dst
)
if
dry_run
:
return
1
return
dst
# On a Mac, use the native file copy routine
if
os
.
name
==
'mac'
:
...
...
@@ -171,7 +170,7 @@ def copy_file (src, dst,
if
preserve_mode
:
os
.
chmod
(
dst
,
S_IMODE
(
st
[
ST_MODE
]))
return
1
return
dst
# copy_file ()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment