guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: installer: Just use "scandir" instead of "ls -1".


From: Danny Milosavljevic
Subject: 01/02: installer: Just use "scandir" instead of "ls -1".
Date: Wed, 5 Jul 2017 06:25:29 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 683a04ee6436ce5d5392309dab0a99c412351918
Author: Danny Milosavljevic <address@hidden>
Date:   Wed Jul 5 12:20:26 2017 +0200

    installer: Just use "scandir" instead of "ls -1".
    
    * gnu/system/installer/key-map.scm (key-map-page-init): Modify.
---
 gnu/system/installer/key-map.scm | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/gnu/system/installer/key-map.scm b/gnu/system/installer/key-map.scm
index 18d7e35..1ece1b0 100644
--- a/gnu/system/installer/key-map.scm
+++ b/gnu/system/installer/key-map.scm
@@ -25,6 +25,7 @@
   #:use-module (gurses buttons)
   #:use-module (ncurses curses)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 ftw)
 
   #:export (make-key-map))
 
@@ -95,11 +96,11 @@
                              (getmaxx (inner frame))
                              (getmaxy text-window) 0 #:panel #f))
 
-        (menu (make-menu
+         (menu (make-menu
                (let ((dir (page-datum p 'directory)))
-                     (slurp (string-append "ls -1 "
-                                               dir)
-                             identity)))))
+                      (filter (lambda (name)
+                                (not (string=? name ".")))
+                      (scandir dir))))))
 
     (menu-post menu menu-window)
 
@@ -114,6 +115,3 @@
     (refresh* (inner frame))
     (refresh* text-window)
     (refresh* button-window)))
-
-
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]