Skip to content

Commit

Permalink
Only strip off everything but the last character if
Browse files Browse the repository at this point in the history
the destination ends with a /, otherwise, rip off the whole
destination root
  • Loading branch information
ShadowKyogre committed Jan 8, 2013
1 parent 9b67865 commit ebcd0c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def run (self):
replace_me = os.path.join(self.install_data,'share/qtarot')
elif self.prefix:
replace_me = os.path.join(self.prefix,'share/qtarot')
consts = [['DATA_DIR', replace_me.replace(self.root[:-1],'')]]
if self.root.endswidth('/'):
consts = [['DATA_DIR', replace_me.replace(self.root[:-1],'')]]
else:
consts = [['DATA_DIR', replace_me.replace(self.root,'')]]
script = open(f, 'w', encoding='utf-8')
script.write(content[:const_begin] + \
"### CONSTANTS BEGIN ###")
Expand Down

0 comments on commit ebcd0c9

Please sign in to comment.