]> git.phdru.name Git - xsetbg.git/commitdiff
Fix a bug: open xsetbg.py with full path
authorOleg Broytman <phd@phdru.name>
Tue, 7 Jan 2014 11:19:40 +0000 (15:19 +0400)
committerOleg Broytman <phd@phdru.name>
Tue, 7 Jan 2014 11:19:40 +0000 (15:19 +0400)
xsetbg.py

index ee9c5f883cdbc521f39d20dc9785b3d8048a361a..d9472bcc0b032d66fa52da1d5cab499df6c51edd 100755 (executable)
--- a/xsetbg.py
+++ b/xsetbg.py
@@ -153,7 +153,8 @@ if not images:
 def change(force=False):
    # Use the program's file as the lock file:
    # lock it to prevent two processes run in parallel.
-   lock_file = open("xsetbg.py", 'r')
+   lock_file = open(os.path.join(xsetbg_dir, 'xsetbg.py'), 'r')
+
    try:
       flock(lock_file, LOCK_EX|LOCK_NB)
    except IOError: # already locked