summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-10-30 10:35:26 (GMT)
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-10-30 10:52:30 (GMT)
commita8e7d8bc2c97be1d99546d8229b84f407b6f2d26 (patch)
tree04ccd65f5c8c5eeac7f6de0df07e7f45e773e5ee
parent7e344b5ff04512b7323d6c42a7bcbe5438ea4e3f (diff)
downloadpulseaudio-a8e7d8bc2c97be1d99546d8229b84f407b6f2d26.tar.gz
pulseaudio-a8e7d8bc2c97be1d99546d8229b84f407b6f2d26.tar.xz
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 f171164..d349bab 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