Skip to content

Commit 101de37

Browse files
committed
Fix to use 'change_root()' rather than directly mangling path.
1 parent 80fa55e commit 101de37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Lib/distutils/command/install_data.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111
from types import StringType
1212
from distutils.core import Command
13+
from distutils.util import change_root
1314

1415
class install_data (Command):
1516

@@ -46,7 +47,7 @@ def run (self):
4647
if not os.path.isabs(dir):
4748
dir = os.path.join(self.install_dir, dir)
4849
elif self.root:
49-
dir = os.path.join(self.root, dir[1:])
50+
dir = change_root(self.root, dir)
5051
self.mkpath(dir)
5152
for data in f[1]:
5253
self.copy_file(data, dir)

0 commit comments

Comments
 (0)