diff options
author | Ken Moore <ken@pcbsd.org> | 2015-01-20 12:25:50 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-01-20 12:25:50 -0500 |
commit | 8b71e4a84a5826b80820599fb42706f73b4a82e3 (patch) | |
tree | 49969a9ab0284ce254c213e52fe389eda005636c /lumina-open/main.cpp | |
parent | Add a couple new features to how image files are handles in lumina-fm: (diff) | |
download | lumina-8b71e4a84a5826b80820599fb42706f73b4a82e3.tar.gz lumina-8b71e4a84a5826b80820599fb42706f73b4a82e3.tar.bz2 lumina-8b71e4a84a5826b80820599fb42706f73b4a82e3.zip |
Fix the detection of file extensions within lumina-open for files that have multiple "."s in the name.
Diffstat (limited to 'lumina-open/main.cpp')
-rw-r--r-- | lumina-open/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp index 233be999..0d4a6d26 100644 --- a/lumina-open/main.cpp +++ b/lumina-open/main.cpp @@ -188,9 +188,11 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat if( !isFile && !isUrl ){ qDebug() << "Error: Invalid file or URL"; return;} //Determing the type of file (extension) QString extension; + //qDebug() << "File Type:" << isFile << isUrl; if(isFile){ QFileInfo info(inFile); - extension=info.completeSuffix(); + extension=info.suffix(); + //qDebug() << " - Extension:" << extension; if(info.isDir()){ extension="directory"; } else if(info.isExecutable() && extension.isEmpty()){ extension="binary"; } else if(extension!="desktop"){ extension="mimetype"; } //flag to check for mimetype default based on file |