handle errors from reading project directory while looking for .sublime-project file

This commit is contained in:
Alan Hamlett 2015-02-05 17:40:45 -08:00
parent 08172098e2
commit 82530cef4f

View File

@ -119,10 +119,13 @@ def enough_time_passed(now, last_time):
def find_project_name_from_folders(folders): def find_project_name_from_folders(folders):
for folder in folders: try:
for file_name in os.listdir(folder): for folder in folders:
if file_name.endswith('.sublime-project'): for file_name in os.listdir(folder):
return file_name.replace('.sublime-project', '', 1) if file_name.endswith('.sublime-project'):
return file_name.replace('.sublime-project', '', 1)
except:
pass
return None return None