From 5eb9acd8b6b25e805aceabba1598f991b0ba3390 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 10 Feb 2012 22:36:24 +0100 Subject: [PATCH] Olaf Flebbe: Avoid infinite recursion in simgear::Dir::create when using it with a relative path. --- simgear/misc/sg_dir.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/misc/sg_dir.cxx b/simgear/misc/sg_dir.cxx index 8922b030..1514c950 100644 --- a/simgear/misc/sg_dir.cxx +++ b/simgear/misc/sg_dir.cxx @@ -265,7 +265,7 @@ bool Dir::create(mode_t mode) // recursively create parent directories Dir pr(parent()); - if (!pr.exists()) { + if (!pr.path().isNull() && !pr.exists()) { bool ok = pr.create(mode); if (!ok) { return false; -- 2.39.5