]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix to use 'change_root()' rather than directly mangling path.
authorGreg Ward <gward@python.net>
Thu, 25 May 2000 02:14:26 +0000 (02:14 +0000)
committerGreg Ward <gward@python.net>
Thu, 25 May 2000 02:14:26 +0000 (02:14 +0000)
Lib/distutils/command/install_data.py

index 65d188f7b379c41c622dd90fcbba7fed6faa6288..acc89aa395da67454d78c125314e789e3ee2e090 100644 (file)
@@ -10,6 +10,7 @@ __revision__ = "$Id$"
 import os
 from types import StringType
 from distutils.core import Command
+from distutils.util import change_root
 
 class install_data (Command):
 
@@ -46,7 +47,7 @@ class install_data (Command):
                 if not os.path.isabs(dir):
                     dir = os.path.join(self.install_dir, dir)
                 elif self.root:
-                    dir = os.path.join(self.root, dir[1:])
+                    dir = change_root(self.root, dir)
                 self.mkpath(dir)
                 for data in f[1]:
                     self.copy_file(data, dir)