Version: 0.5 (using KDE KDE 3.5.0) Installed from: Debian testing/unstable Packages OS: Linux make sure you don't have foo.ps in /tmp and try following: kpdf /tmp/foo.ps output is: Error: /undefinedfilename in (/tmp/foo.ps) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push Dictionary stack: --dict:1121/1686(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)-- Current allocation mode is local Last OS error: 2 ESP Ghostscript 815.01: Unrecoverable error, exit code 1 And blank page opens. If I try the same with foo.pdf (also non-existing) I get error describing that the file is not found. I should get the same error dialog with the foo.ps file
SVN commit 499855 by aacid: Make non-exisant ps file loading fail gracefully BUGS: 120343 M +17 -12 part.cpp --- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #499854:499855 @@ -362,20 +362,25 @@ QString app = KStandardDirs::findExe( "ps2pdf" ); if ( !app.isNull() ) { - KTempFile tf( QString::null, ".pdf" ); - if ( tf.status() == 0 ) - { - tf.close(); - m_temporaryLocalFile = tf.name(); + if ( QFile::exists(m_file) ) + { + KTempFile tf( QString::null, ".pdf" ); + if ( tf.status() == 0 ) + { + tf.close(); + m_temporaryLocalFile = tf.name(); - KProcess *p = new KProcess; - *p << app; - *p << m_file << m_temporaryLocalFile; - m_pageView->showText(i18n("Converting from ps to pdf..."), 0); - connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(psTransformEnded())); - p -> start(); - return true; + KProcess *p = new KProcess; + *p << app; + *p << m_file << m_temporaryLocalFile; + m_pageView->showText(i18n("Converting from ps to pdf..."), 0); + connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(psTransformEnded())); + p -> start(); + return true; + } + else return false; } + else return false; } else {