From a766e7f85e72c3b2a809f26d5c582cbfc5322aed 2015-12-10 22:43:17 From: Miguel Valdez Date: 2015-12-10 22:43:17 Subject: [PATCH] Data directories are sorted before reading files --- diff --git a/schainpy/model/io/jroIO_base.py b/schainpy/model/io/jroIO_base.py index ee811f2..a5b768f 100644 --- a/schainpy/model/io/jroIO_base.py +++ b/schainpy/model/io/jroIO_base.py @@ -1084,6 +1084,11 @@ class JRODataReader(JRODataIO): fileList = glob.glob1(single_path, "*"+ext) + if not fileList: + continue + + fileList.sort() + for thisFile in fileList: if not os.path.isfile(os.path.join(single_path, thisFile)): @@ -1127,6 +1132,8 @@ class JRODataReader(JRODataIO): if not dirList: continue + dirList.sort() + for thisDir in dirList: datapath = os.path.join(single_path, thisDir, expLabel)