From bb18295798cbf55bfbcf679794eb79025284bd3d Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 5 Jan 2014 11:16:57 +0100 Subject: [PATCH] Use realpath to detect symlinked instances. --- dosagelib/singleton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dosagelib/singleton.py b/dosagelib/singleton.py index 3100cfe79..b53cb8ddd 100644 --- a/dosagelib/singleton.py +++ b/dosagelib/singleton.py @@ -32,7 +32,7 @@ class SingleInstance(object): """Create an exclusive lockfile or exit with an error and the given exit code.""" self.initialized = False - scriptname = os.path.splitext(os.path.abspath(sys.argv[0]))[0] + scriptname = os.path.splitext(os.path.realpath(sys.argv[0]))[0] lockname = scriptname.replace("/", "-").replace(":", "").replace("\\", "-") if flavor_id: lockname += "-%s" % flavor_id