diff options
author | Ken Moore <ken@pcbsd.org> | 2014-11-13 08:53:07 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-11-13 08:53:07 -0500 |
commit | 9a1131659e196152221aa25befb07cae200c7cc0 (patch) | |
tree | becfbd49c8b183ca556cddaca3c89ce4dabf2f9a /lumina-fm/main.cpp | |
parent | Update the FreeBSD port pkg list (and a minor fix for lumina-config UI) (diff) | |
download | lumina-9a1131659e196152221aa25befb07cae200c7cc0.tar.gz lumina-9a1131659e196152221aa25befb07cae200c7cc0.tar.bz2 lumina-9a1131659e196152221aa25befb07cae200c7cc0.zip |
Clean up the lumina-fm CLI parsing a bit:
1) Convert a "." to the current working path
2) Provide feedback about invalid input paths graphically
Diffstat (limited to 'lumina-fm/main.cpp')
-rw-r--r-- | lumina-fm/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp index 18c75223..e2f70bc1 100644 --- a/lumina-fm/main.cpp +++ b/lumina-fm/main.cpp @@ -15,7 +15,14 @@ int main(int argc, char ** argv) { QStringList in; for(int i=1; i<argc; i++){ //skip the first arg (app binary) - in << QString(argv[i]); + QString path = argv[i]; + if(path=="."){ + //Insert the current working directory + in << QDir::currentPath(); + }else{ + if(!path.startsWith("/")){ path.prepend(QDir::currentPath()+"/"); } + in << path; + } } if(in.isEmpty()){ in << QDir::homePath(); } #ifdef __FreeBSD__ |