only write .cuts file when .ts file is still accessible
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 7 Oct 2006 16:31:52 +0000 (16:31 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 7 Oct 2006 16:31:52 +0000 (16:31 +0000)
lib/service/servicedvb.cpp

index 99474a86e88c99d83bba5aea266e735efa132902..75b55215b9158099309f3785d8ce55c5ae2fa873 100644 (file)
@@ -21,6 +21,7 @@
 #include <lib/gui/esubtitle.h>
 
 #include <sys/vfs.h>
+#include <sys/stat.h>
 
 #include <byteswap.h>
 #include <netinet/in.h>
@@ -826,7 +827,12 @@ RESULT eDVBServicePlay::stop()
        m_service_handler.free();
        
        if (m_is_pvr && m_cuesheet_changed)
-               saveCuesheet();
+       {
+               struct stat s;
+                               /* save cuesheet only when main file is accessible. */
+               if (!::stat(m_reference.path.c_str(), &s))
+                       saveCuesheet();
+       }
        
        return 0;
 }