1
0
mirror of https://github.com/wting/autojump synced 2025-06-13 12:54:07 +00:00

try to use absolute paths when manually adding

This commit is contained in:
Sven Taute 2013-03-11 00:19:02 +01:00
parent 54aeff1cae
commit f4c4b43b33

View File

@ -272,7 +272,11 @@ def options():
if (ARGS.add): if (ARGS.add):
if(ARGS.add != os.path.expanduser("~")): if(ARGS.add != os.path.expanduser("~")):
db = Database(DB_FILE) db = Database(DB_FILE)
db.add(decode(ARGS.add)) path = decode(ARGS.add)
if os.path.exists(path):
db.add(os.path.abspath(path))
else:
db.add(path)
return True return True
if (ARGS.decrease): if (ARGS.decrease):