[gnome-builder] pipeline: check _build is a directory and not a symlink
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] pipeline: check _build is a directory and not a symlink
- Date: Fri, 3 Aug 2018 19:07:27 +0000 (UTC)
commit 41cf077dbd297f67d02ebe6f0f96354ca8f1712d
Author: Christian Hergert <chergert redhat com>
Date: Fri Aug 3 12:04:31 2018 -0700
pipeline: check _build is a directory and not a symlink
src/libide/buildsystem/ide-build-pipeline.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 1d58eac9c..808043ad3 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -3360,7 +3360,9 @@ can_remove_builddir (IdeBuildPipeline *self)
*/
context = ide_object_get_context (IDE_OBJECT (self));
_build = ide_context_build_filename (context, "_build", NULL);
- if (g_str_equal (_build, self->builddir))
+ if (g_str_equal (_build, self->builddir) &&
+ g_file_test (_build, G_FILE_TEST_IS_DIR) &&
+ !g_file_test (_build, G_FILE_TEST_IS_SYMLINK))
return TRUE;
g_debug ("%s is not in a cache directory, will not delete it", self->builddir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]