mirror of
https://github.com/python/cpython.git
synced 2025-11-08 21:52:45 +00:00
[Bug #444589] Record empty directories in the install_data command
Slightly modified version of patch from Jon Nelson (jnelson).
This commit is contained in:
parent
a8ea5ba8a9
commit
4d335b3b9b
1 changed files with 12 additions and 4 deletions
|
|
@ -63,6 +63,14 @@ class install_data (Command):
|
||||||
elif self.root:
|
elif self.root:
|
||||||
dir = change_root(self.root, dir)
|
dir = change_root(self.root, dir)
|
||||||
self.mkpath(dir)
|
self.mkpath(dir)
|
||||||
|
|
||||||
|
if f[1] == []:
|
||||||
|
# If there are no files listed, the user must be
|
||||||
|
# trying to create an empty directory, so add the
|
||||||
|
# directory to the list of output files.
|
||||||
|
self.outfiles.append(dir)
|
||||||
|
else:
|
||||||
|
# Copy files, adding them to the list of output files.
|
||||||
for data in f[1]:
|
for data in f[1]:
|
||||||
data = convert_path(data)
|
data = convert_path(data)
|
||||||
(out, _) = self.copy_file(data, dir)
|
(out, _) = self.copy_file(data, dir)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue