Skip to content

Spaces are not supported in mountpoints #2

@Ambrevar

Description

@Ambrevar

When a drive name contains a space, most actions will fail due to mountpoint only containing the first part of the name until the first space.

The relevant code is here I believe

(defun helm-linux-disks--lsblk ()
  "Get an alist of candidates for `helm-linux-disks--lsblk-source'."
  (cl-loop for ((level . raw) . kdr) on (helm-linux-disks--lsblk-with-levels)
           for next-level = (when kdr (caar kdr))
           for has-child = (and next-level
                                (< level next-level))
           for (name mountpoint fstype type _size) = (pcase (split-string
                                                             (helm-linux-disks--lsblk-trim raw))
                                                       (`(,name ,type ,size)
                                                        (list name nil nil type nil size))
                                                       (`(,name ,fstype ,type ,size)
                                                        (list name nil fstype type size))
                                                       (fields fields))
           collect (cons raw
                         (make-linux-disk
                          :path name
                          :mountpoint mountpoint
                          :fstype fstype
                          :type (intern type)
                          :has-child-p has-child))))

You could either get the mountpoint as "everything but the last 2 words" or by calling
lsblk -n -p -o "mountpoint" or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions