Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.2, 0.9.3, and 1.0

stable shellext: GetHgRepoRoot: don't call IsDirectory on UNC server shares

Refs #826

Changeset 9e6c172dbfa8

Parent c2b9832a7ca6

by Adrian Buehlmann

Changes to one file · Browse files at 9e6c172dbfa8 Showing diff from parent c2b9832a7ca6 Diff from another changeset...

 
264
265
266
 
 
 
 
 
 
 
 
267
268
269
270
271
 
 
 
 
 
 
 
272
273
274
 
278
279
280
 
 
281
282
283
 
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
 
279
280
281
282
283
284
285
286
287
288
 
292
293
294
295
296
297
298
299
@@ -264,11 +264,25 @@
   std::string GetHgRepoRoot(const std::string& path)  { + TDEBUG_TRACE("GetHgRepoRoot('" << path << "')"); + + if (::PathIsUNCServerShare(path.c_str())) + { + TDEBUG_TRACE("GetHgRepoRoot: path is UNC share '" << path << "'"); + return ""; + } +   std::string p = IsDirectory(path)? path : DirName(path);   for (;;)   {   std::string tdir = p + "\\.hg"; - if (IsDirectory(tdir)) + if (::PathIsUNCServerShare(tdir.c_str())) + { + TDEBUG_TRACE("GetHgRepoRoot: tdir is UNC share '" << tdir << "'"); + p.clear(); + break; + } + else if (IsDirectory(tdir))   break;   std::string oldp = p;   p = DirName(p); @@ -278,6 +292,8 @@
  break;   }   } + + TDEBUG_TRACE("GetHgRepoRoot: returning '" << p << "'");   return p;  }