+2009-05-26 Zoltan Varga <vargaz@gmail.com>
+
+ * shared.c (_wapi_shm_file): Avoid creating a .wapi directory here, create
+ it in _wapi_shm_file_open (), since platforms using posix shm don't need it.
+
2009-05-22 Miguel de Icaza <miguel@novell.com>
* wapi_glob.c: Do not need sys/param.h anymore, we now use the
_wapi_shm_file (_wapi_shm_t type)
{
static gchar file[_POSIX_PATH_MAX];
- gchar *name = NULL, *filename, *dir, *wapi_dir;
+ gchar *name = NULL, *filename, *wapi_dir;
name = _wapi_shm_base_name (type);
g_snprintf (file, _POSIX_PATH_MAX, "%s", filename);
g_free (filename);
-
- /* No need to check if the dir already exists or check
- * mkdir() errors, because on any error the open() call will
- * report the problem.
- */
- dir = g_path_get_dirname (file);
- mkdir (dir, 0755);
- g_free (dir);
return file;
}
int ret, tries = 0;
gboolean created = FALSE;
mode_t oldmask;
+ gchar *dir;
+
+ /* No need to check if the dir already exists or check
+ * mkdir() errors, because on any error the open() call will
+ * report the problem.
+ */
+ dir = g_path_get_dirname (filename);
+ mkdir (dir, 0755);
+ g_free (dir);
try_again:
if (tries++ > 10) {