Use the static storage to check mimetype icon existence.

Review Request #3166 — Created June 29, 2012 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Use the static storage to check mimetype icon existence.

Our mimetype icon existence code was assuming the existance of
STATIC_ROOT and then looking for file existence from there. This isn't
really how it should be used, and will fail when it's not even local
storage or when it's a dev install.

Now, we use the pipeline storage's exists() function, which will do the
right thing. As part of this, I've cleaned up the path building a little
bit.
Tested this with my local dev install without any static media collected.
I previously was hitting the default fallback icon, but now I'm hitting the
proper icons for the file attachments.
    Loading...