projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 134 : Fix charm copy from descriptor package
[osm/SO.git]
/
rwlaunchpad
/
plugins
/
rwlaunchpadtasklet
/
rift
/
package
/
package.py
diff --git
a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py
b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py
index
355b23b
..
45d8ba8
100644
(file)
--- a/
rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py
+++ b/
rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py
@@
-314,7
+314,14
@@
class DescriptorPackage(object):
continue
# Copy the contents of the file to the correct path
continue
# Copy the contents of the file to the correct path
- dest_file_path = os.path.join(dest_root_dir, filename)
+ # Remove the common prefix and create the dest filename
+ if src_dir is not None:
+ fname = filename[len(src_dir):]
+ if fname[0] == '/':
+ fname = fname[1:]
+ else:
+ fname = filename
+ dest_file_path = os.path.join(dest_root_dir, fname)
dest_dir_path = os.path.dirname(dest_file_path)
if not os.path.exists(dest_dir_path):
os.makedirs(dest_dir_path)
dest_dir_path = os.path.dirname(dest_file_path)
if not os.path.exists(dest_dir_path):
os.makedirs(dest_dir_path)