Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

OverlayServer: catch exception of os.listdir(path).

This exception raises in case of
fixutf8 extension enabled and folder name contains '0x5c'(backslash).

Changeset 057b03f445f9

Parent a488c65a5b34

by Toshi MARUYAMA

Changes to one file · Browse files at 057b03f445f9 Showing diff from parent a488c65a5b34 Diff from another changeset...

 
203
204
205
206
207
208
209
210
 
 
 
 
 
 
 
 
 
 
211
212
213
 
203
204
205
 
 
 
 
 
206
207
208
209
210
211
212
213
214
215
216
217
218
@@ -203,11 +203,16 @@
  for path in batch:   r = paths.find_root(path)   if r is None: - for n in os.listdir(path): - r = paths.find_root(os.path.join(path, n)) - if (r is not None): - roots.add(r) - notifypaths.add(r) + try: + for n in os.listdir(path): + r = paths.find_root(os.path.join(path, n)) + if (r is not None): + roots.add(r) + notifypaths.add(r) + except Exception, e: + # This exception raises in case of fixutf8 extension enabled + # and folder name contains '0x5c'(backslash). + logger.msg('Failed listdir %s (%s)' % (path, str(e)))   else:   roots.add(r);   notifypaths.add(path)