playvid: fix weird pathname parsing

This commit is contained in:
LordMZTE 2023-07-07 21:45:14 +02:00
parent 74ef348905
commit 17402a5fd4
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -12,7 +12,7 @@ exec ros -Q -- $0 "$@"
(in-package :playvid)
(defun main (&rest argv)
(let* ((vidfile (or (car argv)
(let* ((vidfile (or (uiop:parse-native-namestring (car argv))
(let ((dir (uiop:directory-files ".")))
(nth (random (length dir) (make-random-state t)) dir))))
(basename (pathname-name vidfile)))