* Only attempt to chdir to non-empty path.
authorUrban Wallasch <urban.wallasch@freenet.de>
Wed, 12 May 2021 18:04:52 +0000 (20:04 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Wed, 12 May 2021 18:04:52 +0000 (20:04 +0200)
ffpreview.py

index 2910d40af2191d458baebf6f97cd0818ae4dabfa..f79d62b106c2502e8f60ec81e4876d5b2c3832d3 100755 (executable)
@@ -571,7 +571,9 @@ class sMainWindow(QMainWindow):
         if not os.path.exists(fname) or not os.access(fname, os.R_OK):
             return
         cfg['vid'] = os.path.basename(fname)
-        os.chdir(os.path.dirname(fname))
+        fdir = os.path.dirname(fname)
+        if fdir:
+            os.chdir(fdir)
         self.setWindowTitle('ffpreview - '+cfg['vid'])
 
         # prepare thumbnail directory