sysprof fails to load file with special characters from command line
Hey!
I experienced an issue just now with opening syscaps with sysprof from the command line if the filename has escaped characters.
To make sure that my syscaps had unique names I used date --iso-8601=seconds
in its name and then opening those with sysprof
failed. It worked fine to open them
from within a launched sysprof
though!
The session below explains my findings:
$ sysprof capture-2023-11-08T13\:47\:11+01\:00.syscap
** (sysprof:59589): WARNING **: 14:05:06.094: Cannot open non-native file "capture-2023-11-08t13:///47:11+01:00.syscap"
$ ### Try with another filename ###
$ mv capture-2023-11-08T13\:47\:11+01\:00.syscap capture-2023-11-08T13.syscap
$ sysprof capture-2023-11-08T13.syscap
^C
$ ### That loaded fine! (I saw the entire capture as expected etc) ###
$
$ ### Check if it's the colons or the plus that breaks ###
$ mv capture-2023-11-08T13.syscap capture-2023-11-08T13\:47\:11.syscap
$ sysprof capture-2023-11-08T13\:47\:11.syscap
** (sysprof:59819): WARNING **: 14:06:32.498: Cannot open non-native file "capture-2023-11-08t13:///47:11.syscap"
$
$ mv capture-2023-11-08T13\:47\:11.syscap capture-2023-11-08T13+47+11.syscap
$ sysprof capture-2023-11-08T13+47+11.syscap
^C
$ ### This worked fine as well, so it is the colon! (I guess any escaped character might cause this?) ###
$ sysprof --version
Sysprof version 45.1
$ cat /etc/os-release | grep -E '^(VERSION|NAME)='
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
Oh, and thanks for an amazing project!
Edited by Mattias Bengtsson