summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-10-30 11:35:26 +0100
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-10-30 16:22:30 +0530
commita8e7d8bc2c97be1d99546d8229b84f407b6f2d26 (patch)
tree04ccd65f5c8c5eeac7f6de0df07e7f45e773e5ee
parent7e344b5ff04512b7323d6c42a7bcbe5438ea4e3f (diff)
core-util: Don't error out on existing runtime directory.
When compiling without HAVE_SYMLINK the runtime dir is a real directory, which is attempted to be created. In the case it already exists we shouldn't error out. The HAVE_SYMLINK-enabled code already does this.
-rw-r--r--src/pulsecore/core-util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index f1711646a..d349bab4f 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1789,8 +1789,9 @@ char *pa_get_runtime_dir(void) {
goto fail;
}
#else
- /* No symlink possible, so let's just create the runtime directly */
- if (mkdir(k) < 0)
+ /* No symlink possible, so let's just create the runtime directly
+ * Do not check again if it exists since it cannot be a symlink */
+ if (mkdir(k) < 0 && errno != EEXIST)
goto fail;
#endif