aboutsummaryrefslogtreecommitdiff
path: root/ponysay
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-22 00:11:10 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-22 00:11:10 +0200
commit5744c13146e3401e479e58cca87d872423b046e2 (patch)
tree58d00e8debec60bb503a9e35bb112352d408ca92 /ponysay
parentf76bef8facffab5eda3b9faefe76591f8d1a163a (diff)
downloadponysay-5744c13146e3401e479e58cca87d872423b046e2.tar.gz
ponysay-5744c13146e3401e479e58cca87d872423b046e2.tar.bz2
ponysay-5744c13146e3401e479e58cca87d872423b046e2.zip
I think readlink only follows one level, this should get the canonical path (absolute and to the last level)
Diffstat (limited to 'ponysay')
-rwxr-xr-xponysay2
1 files changed, 1 insertions, 1 deletions
diff --git a/ponysay b/ponysay
index afcc595..f177ad3 100755
--- a/ponysay
+++ b/ponysay
@@ -257,7 +257,7 @@ class Ponysay():
if (len(pony) > 5) and (pony[-5:] == '.pony'):
ponies.append(pony[:-5])
ponies.sort()
- pairs = [(pony, os.readlink(ponydir + pony + '.pony') if os.path.islink(ponydir + pony + '.pony') else '') for pony in ponies]
+ pairs = [(pony, os.path.realpath(ponydir + pony + '.pony') if os.path.islink(ponydir + pony + '.pony') else '') for pony in ponies]
ponymap = {}
for pair in pairs: