Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion installer/InstallBuilder/linuxdpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def GenerateScripts(self):

for l in self.sections["Links"]:
filePath = self.stagingDir + l.stagedLocation
retval = os.system('sudo chown --no-dereference %s:%s %s' \
retval = os.system('sudo chown --no-dereference %s:%s "%s"' \
% (l.owner, l.group, filePath))
if retval != 0:
print("Error: Unable to chown " + l.stagedLocation)
Expand Down
4 changes: 2 additions & 2 deletions installer/InstallBuilder/scxutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def Touch(path):
def ChOwn(path,uid,gid):
# Must use 'os.system' rather than os.chown because 'root' will be passed
# (and we use 'sudo' to allow things like uid=root)
retval = os.system('sudo chown %s:%s %s' % (uid,gid,path))
retval = os.system('sudo chown %s:%s "%s"' % (uid,gid,path))
if retval != 0:
print("Unable to chown %s." % path)
exit(1)
Expand All @@ -94,7 +94,7 @@ def ChOwn(path,uid,gid):
#
def ChMod(path,mode):
# Muse use 'os.system' rather than os.chmod because we may need 'sudo' ...
retval = os.system('sudo chmod %s %s' % (mode, path))
retval = os.system('sudo chmod %s "%s"' % (mode, path))
if retval != 0:
print("Unable to chmod %s." % path)
exit(1)
Expand Down
3 changes: 3 additions & 0 deletions installer/InstallBuilder/unittests/filename_with_space.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
%Files
/tmp/space in file.txt; space in file.txt; 777; root; root

7 changes: 7 additions & 0 deletions installer/InstallBuilder/unittests/ib_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ def Test_LargeConditionalPath():

print("PASS")

# This test validates that we can build a package with a filename with spaces
def Test_FilenameWithSpace():
print("TEST: " + inspect.currentframe().f_code.co_name)
RunInstallBuilder("base_dummy.data filename_with_space.data")

print("PASS")

# MAIN
Variables = dict()
Expand Down Expand Up @@ -270,3 +276,4 @@ def Test_LargeConditionalPath():
Test_SectionsInNumericOrder()
Test_VariableOverride()
Test_LargeConditionalPath()
Test_FilenameWithSpace()
1 change: 1 addition & 0 deletions installer/InstallBuilder/unittests/space in file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
space in file text