file mode strangeness noticed when browsing gconf code



We thought there was a bug with how gconf was creating directories. There
was no bug, but I found something bad while inspecting the code:

Index: xml-dir.c
===================================================================
RCS file: /cvs/gnome/gconf/backends/xml-dir.c,v
retrieving revision 1.12
diff -p -u -r1.12 xml-dir.c
--- xml-dir.c    2000/01/26 23:36:23    1.12
+++ xml-dir.c    2000/09/14 22:22:16
@@ -200,7 +200,7 @@ dir_load        (const gchar* key, const
     else
       {
         dir_mode = mode_t_to_mode(s.st_mode);
-        file_mode &= ~0111; /* turn off search bits */
+        file_mode = dir_mode & ~0111; /* turn off search bits */
       }
   }
===================================================================

I noticed xml-backend.c had similar code without this anomaly.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]