From cc3727bfbd9fc5ded4d34ededef9f8edb2730fb3 Mon Sep 17 00:00:00 2001 From: Bob-F <38539206+UAV-Pilot@users.noreply.github.com> Date: Wed, 1 Aug 2018 00:48:55 -0700 Subject: [PATCH] skip creation of self-pointing link --- platforms/posix/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/posix/src/main.cpp b/platforms/posix/src/main.cpp index 3820ba709f..54478e838d 100644 --- a/platforms/posix/src/main.cpp +++ b/platforms/posix/src/main.cpp @@ -425,7 +425,7 @@ int main(int argc, char **argv) PX4_DEBUG("Creating symlink %s -> %s", src_path.c_str(), dest_path.c_str()); - if (dirExists(path_sym_link)) { continue; } + if (dirExists(path_sym_link) || src_path == dest_path) { continue; } // create sym-links int ret = symlink(src_path.c_str(), dest_path.c_str());