diff options
| -rw-r--r-- | lib/mat.py | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -35,12 +35,12 @@ def get_sharedir(filename): | |||
| 35 | ''' | 35 | ''' |
| 36 | An ugly hack to find various files | 36 | An ugly hack to find various files |
| 37 | ''' | 37 | ''' |
| 38 | if os.path.exists(os.path.join('/usr/local/share/mat/', filename)): | 38 | if os.path.isfile(filename): |
| 39 | return '.' | ||
| 40 | elif os.path.exists(os.path.join('/usr/local/share/mat/', filename)): | ||
| 39 | return os.path.join('/usr/local/share/mat/', filename) | 41 | return os.path.join('/usr/local/share/mat/', filename) |
| 40 | elif os.path.exists(os.path.join('/usr/share/mat/', filename)): | 42 | elif os.path.exists(os.path.join('/usr/share/mat/', filename)): |
| 41 | return os.path.join('/usr/share/mat', filename) | 43 | return os.path.join('/usr/share/mat', filename) |
| 42 | elif os.path.isfile('FORMATS'): | ||
| 43 | return '.' | ||
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | class XMLParser(xml.sax.handler.ContentHandler): | 46 | class XMLParser(xml.sax.handler.ContentHandler): |
