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

List:       kde-commits
Subject:    kdesupport/strigi/src/streamanalyzer
From:       Jos van den Oever <jos () vandenoever ! info>
Date:       2009-12-23 20:10:22
Message-ID: 1261599022.501868.11039.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1065604 by vandenoever:

Fix uninitialized values for non-existant file.

 M  +4 -2      diranalyzer.cpp  


--- trunk/kdesupport/strigi/src/streamanalyzer/diranalyzer.cpp #1065603:1065604
@@ -235,9 +235,11 @@
         retval = stat(path.c_str(), &s);
     }
     time_t mtime = (retval == -1) ?0 :s.st_mtime;
-    retval = analyzeFile(path, mtime, S_ISREG(s.st_mode));
+    bool isfile = (retval == -1) ?false :S_ISREG(s.st_mode);
+    bool isdir = (retval == -1) ?false :S_ISDIR(s.st_mode);
+    retval = analyzeFile(path, mtime, isfile);
     // if the path does not point to a directory, return
-    if (!S_ISDIR(s.st_mode)) {
+    if (!isdir) {
         manager.indexWriter()->commit();
         return retval;
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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