From ca55acf9801bc4d1cb27c7424dbb0f13c6da4b6d Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Wed, 20 May 2015 08:07:47 +0200 Subject: [PATCH] Don't change to form config dir if we're already there. --- src/scriptform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scriptform.py b/src/scriptform.py index fa1d1bc..7f22e3e 100755 --- a/src/scriptform.py +++ b/src/scriptform.py @@ -1177,7 +1177,9 @@ if __name__ == "__main__": # If a form configuration was specified, change to that dir so we can # find the job scripts and such. if len(args) > 0: - os.chdir(os.path.dirname(args[0])) + path = os.path.dirname(args[0]) + if path: + os.chdir(path) args[0] = os.path.basename(args[0]) daemon = Daemon(options.pid_file, options.log_file,