diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-22 00:11:10 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-22 00:11:10 +0200 |
commit | 5744c13146e3401e479e58cca87d872423b046e2 (patch) | |
tree | 58d00e8debec60bb503a9e35bb112352d408ca92 /ponysay | |
parent | f76bef8facffab5eda3b9faefe76591f8d1a163a (diff) | |
download | ponysay-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-x | ponysay | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |