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

List:       kde-commits
Subject:    KDE/kdelibs/kioslave/file
From:       David Faure <faure () kde ! org>
Date:       2009-03-09 13:18:15
Message-ID: 1236604695.942080.21148.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 937303 by dfaure:

only chdir() if getcwd() worked. Ignore the actual error from getcwd, if it fails we \
                can still do the job.
CCMAIL: mpyne@purinchu.net


 M  +3 -2      file_unix.cpp  


--- trunk/KDE/kdelibs/kioslave/file/file_unix.cpp #937302:937303
@@ -371,7 +371,7 @@
            as the slave runs in the background, it's hard
            to see for the user what the problem would be */
         char path_buffer[PATH_MAX];
-        getcwd(path_buffer, PATH_MAX - 1);
+        (void) getcwd(path_buffer, PATH_MAX - 1);
         if ( chdir( _path.data() ) )  {
             if (errno == EACCES)
                 error(ERR_ACCESS_DENIED, path);
@@ -394,7 +394,8 @@
 
         //kDebug(7101) << "============= COMPLETED LIST ============";
 
-        chdir(path_buffer);
+        if (path_buffer)
+            chdir(path_buffer);
     }
     finished();
 }


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

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