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

List:       kde-commits
Subject:    KDE/kdelibs/kioslave/file
From:       Allen Winter <winter () kde ! org>
Date:       2009-03-17 12:38:26
Message-ID: 1237293506.513792.2377.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 940399 by winterz:

forwardport SVN commit 939987,940021 by coolo:

always pass a mode if the flag is O_CREAT
CCMAIL: coolo@kde.org


 M  +5 -1      file.cpp  


--- trunk/KDE/kdelibs/kioslave/file/file.cpp #940398:940399
@@ -446,7 +446,11 @@
         flags |= O_TRUNC;
     }
 
-    const int fd = KDE::open(openPath, flags);
+    int fd = -1;
+    if ( flags & O_CREAT)
+        fd = KDE::open( openPath, flags, 0666);
+    else
+        fd = KDE::open( openPath, flags);
     if ( fd < 0 ) {
         error(KIO::ERR_CANNOT_OPEN_FOR_READING, openPath);
         return;
[prev in list] [next in list] [prev in thread] [next in thread] 

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