Skip to content

Commit

Permalink
fix(jail/fstab): Remove replacement of spaces and split on tabs (#2732)
Browse files Browse the repository at this point in the history
Other side of iocage ticket
Ticket: #76864
  • Loading branch information
Brandon Schneider committed Mar 8, 2019
1 parent 26dc070 commit 1324ea6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/middlewared/middlewared/plugins/jail.py
Expand Up @@ -685,8 +685,6 @@ def fstab(self, jail, options):
'Provided path for source does not exist'
)

source = source.replace(' ', r'\040') # fstab hates spaces ;)

destination = options.get('destination')
if destination:
destination = f'/{destination}' if destination[0] != '/' else destination
Expand All @@ -708,9 +706,6 @@ def fstab(self, jail, options):
else:
os.makedirs(destination)

# fstab hates spaces ;)
destination = destination.replace(' ', r'\040')

if action != 'list':
for f in options:
if not options.get(f) and f not in ('index',):
Expand Down Expand Up @@ -762,7 +757,7 @@ def fstab(self, jail, options):
)

for i in _list:
fstab_entry = i[1].split()
fstab_entry = i[1].split('\t')
_fstab_type = 'SYSTEM' if fstab_entry[0].endswith(
system_mounts) else 'USER'

Expand Down

0 comments on commit 1324ea6

Please sign in to comment.