[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/kfile-plugins/ogg
From:       Jaison Lee <lee.jaison () gmail ! com>
Date:       2006-10-16 0:50:41
Message-ID: 1160959841.229662.22867.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 595879 by jlee:

Port to new KSaveFile.



 M  +4 -10     kfile_ogg.cpp  


--- trunk/KDE/kdemultimedia/kfile-plugins/ogg/kfile_ogg.cpp #595878:595879
@@ -320,14 +320,8 @@
     else
         filename = info.path();
     
-    // nothing in Qt or KDE to get the mode as an int?
-    struct stat s;
-    stat(QFile::encodeName(filename), &s);
-    
-    KSaveFile sf(filename, s.st_mode);
-    FILE* outfile = sf.fstream();
-
-    if ( sf.status() || !outfile)
+    KSaveFile sf(filename);
+    if ( !sf.open() )
     {
         kDebug(7034) << "couldn't create temp file\n";
         vcedit_clear(state); // frees comment entries and vendor
@@ -336,15 +330,15 @@
         vc->vendor = 0;
         return false;
     }
+    FILE* outfile = sf.fstream();
 
-    
     vcedit_write(state,outfile); // calls vcedit_clear() itself so we don't free anything
 
     if (vc->vendor) free(vc->vendor);
     vc->vendor = 0;
 
     fclose(infile);
-    sf.close();
+    sf.finalize(); //check for error here?
     
     return true;
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic