Bug 428932 - Partition Manager fails to remount when mount point has a space
Summary: Partition Manager fails to remount when mount point has a space
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-10 13:52 UTC by Oliver Beard
Modified: 2020-11-14 01:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 20.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Beard 2020-11-10 13:52:05 UTC
SUMMARY
Partition Manager fails to remount when the mount point, as defined in /etc/fstab has a space in the name, using the control character(?) \040.

STEPS TO REPRODUCE
1. Create an entry for a partition with a mount point in fstab with a space in the name i.e. /media/first\040last refers to '/media/first last'.
2. Unmount this partition.
3. Mount the partition in KDE Partition Manager.

OBSERVED RESULT
/dev/sdc1 mounted at '/media/Virtual Machine' produces the error:
  The file system on partition '/dev/sdc1' could not be mounted.
  Details:
  =====
  Command: mount --verbose /dev/sdc1 /media/Virtual\040Machine
  =====

EXPECTED RESULT
The partition would mount to '/media/Virtual Machine' correctly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma(?): 5.9.6-arch1-1
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Strangely, mounting the partition manually (running 'sudo mount /dev/sdc1 "/media/Virtual Machine"') and refreshing in Partition Manager, then unmounting and mounting does not produce the error. The error begins to occur again after restarting Partition Manager.
Comment 1 Justin Zobel 2020-11-11 03:29:21 UTC
Confirmed on KDE Neon Unstable.
Comment 2 Andrius Štikonas 2020-11-14 00:56:33 UTC
Git commit 2e91730f7a428cff81443c66613570259180c173 by Andrius Štikonas.
Committed on 14/11/2020 at 00:55.
Pushed by stikonas into branch 'release/20.12'.

Fix parsing fstab mountpoints when they contain spaces or tabs.

If the name of the mount point contains spaces or tabs these
can be escaped as `\040' and '\011' respectively.

M  +18   -2    src/core/fstab.cpp
M  +3    -0    src/core/fstab.h

https://invent.kde.org/system/kpmcore/commit/2e91730f7a428cff81443c66613570259180c173