From 649cc69c7f6ad72f615ca1999a51f0c37d32ab98 Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Sat, 30 Aug 2008 21:08:16 +0000 Subject: [PATCH] Hack for Symbian The Unholy, to make mkdirhier() work. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3062 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/file/dirs.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sc2/src/sc2code/libs/file/dirs.c b/sc2/src/sc2code/libs/file/dirs.c index 3045af452..0723e688f 100644 --- a/sc2/src/sc2code/libs/file/dirs.c +++ b/sc2/src/sc2code/libs/file/dirs.c @@ -156,13 +156,23 @@ mkdirhier (const char *path) if (stat (buf, &statbuf) == -1) { - if (errno != ENOENT) + if (errno == ENOENT) + break; +#ifdef __SYMBIAN32__ + // XXX: HACK: If we don't have access to a directory, we can + // still have access to the underlying entries. We don't + // actually know whether the entry is a directory, but I know of + // know way to find out. We just pretend that it is; if we were + // wrong, an error will occur when we try to do something with + // the directory. That /should/ not be a problem, as any such + // action should have its own error checking. + if (errno != EACCES) +#endif { log_add (log_Error, "Can't stat \"%s\": %s", buf, strerror (errno)); goto err; } - break; } if (*pathend == '\0')