Changeset 3469


Ignore:
Timestamp:
Jul 12, 2018 6:37:20 PM (3 years ago)
Author:
toby
Message:

revise Importer ext validation to deal with .sum.tif for 1ID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIobj.py

    r3461 r3469  
    18991899    def ExtensionValidator(self, filename):
    19001900        '''This methods checks if the file has the correct extension
    1901         Return False if this filename will not be supported by this reader
     1901        Return False if this filename will not be supported by this reader (only
     1902          when strictExtension is True)
    19021903        Return True if the extension matches the list supplied by the reader
    19031904        Return None if the reader allows un-registered extensions
     
    19051906        if filename:
    19061907            ext = ospath.splitext(filename)[1]
    1907             if sys.platform == 'windows': ext = ext.lower()
    1908             if ext in self.extensionlist: return True
    1909             if self.strictExtension: return False
    1910         return
     1908            if not ext and self.strictExtension: return False
     1909            for ext in self.extensionlist:               
     1910                if sys.platform == 'windows':
     1911                    if filename.lower().endswith(ext): return True
     1912                else:
     1913                    if filename.endswith(ext): return True
     1914        if self.strictExtension:
     1915            return False
     1916        else:
     1917            return None
    19111918
    19121919    def ContentsValidator(self, filename):
Note: See TracChangeset for help on using the changeset viewer.