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):
try:
for folder in folders:
for file_name in os.listdir(folder):
if file_name.endswith('.sublime-project'):
return file_name.replace('.sublime-project', '', 1)
except:
pass
return None