Skip to content

piglit: Find our data directory when we're invoked through a symlink

Adam Jackson requested to merge ajax/piglit:work-in-tilde-bin into main

If you did (ln -s ~/git/piglit/piglit ~/bin) and then tried to invoke it as just 'piglit', the old code here would look for the data directory in ~/bin. If you readlink() first you get ~/git/piglit as the datadir instead, which seems much more likely to be what you wanted.

You can't see it from context but there's a 'import os.path as path' above this, so removing the os.'s is okay.

Merge request reports