Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(40)

Unified Diff: Lib/msilib/__init__.py

Issue 1128: msilib.Directory.make_short only handles file names with a single dot in them
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: __init__.py
===================================================================
--- __init__.py (revision 72225)
+++ __init__.py (working copy)
@@ -281,9 +281,10 @@
[(feature.id, component)])
def make_short(self, file):
- parts = file.split(".")
- if len(parts)>1:
- suffix = parts[-1].upper()
+ # return a tuple with the name of file and its extension
+ parts = os.path.splitext(file)
+ if parts[1]: # if the file don't has a extension, parts[1] = ''
+ suffix = parts[1].upper()
else:
suffix = None
prefix = parts[0].upper()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+