From 6576b4534854e96aa49c89285664a357ba5e12ba Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Tue, 16 Jan 2001 06:17:18 +0000 Subject: [PATCH] Proper error checking. svn path=/trunk/kdebase/kwin/; revision=78357 --- clients/kwmtheme/cli_installer/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clients/kwmtheme/cli_installer/main.cpp b/clients/kwmtheme/cli_installer/main.cpp index e6a4a7720e..25806a49ad 100644 --- a/clients/kwmtheme/cli_installer/main.cpp +++ b/clients/kwmtheme/cli_installer/main.cpp @@ -42,14 +42,15 @@ int main(int argc, char **argv) KCmdLineArgs::addCmdLineOptions( options ); KApplication app(argc, argv); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString srcStr = QString(QFile::decodeName(args->arg(0))); - QFile f(srcStr); - QString tmpStr; - if(!args->count()){ qWarning("You need to specify the path to a theme config file!"); return(1); } + + QString srcStr = QString(QFile::decodeName(args->arg(0))); + QFile f(srcStr); + QString tmpStr; + if(!f.exists()){ qWarning("Specified theme config file doesn't exist!"); return(2);