Hi,

> > +            while not os.path.isdir(os.path.join(current_dir,
> > self.MARKER_DIR)):
> > +                if os.path.samefile(current_dir, \
> > +                        os.path.join(current_dir, os.path.pardir)):
> > +                    # we reached the root directory - stop
> > +                    break 
> 
> os.path.samefile() is not available on Windows. Can we consider an
> alternative solution? Perhaps by comparing absolute path names?

I didn't check the availability of os.path.samefile - sorry!

I attached an alternative condition.
To make sure, that everything works as expected, maybe someone with access to a
windows environment could check, if the following condition returns true?
 os.path.dirname('E:\') == 'E:\'
I cannot test it here ...

regards,
Lars

 
Index: versioncontrol.py
===================================================================
--- versioncontrol.py	(Revision 6128)
+++ versioncontrol.py	(Arbeitskopie)
@@ -264,8 +264,7 @@
             # avoid any dead loops (could this happen?)
             max_depth = 64
             while not os.path.isdir(os.path.join(current_dir, self.MARKER_DIR)):
-                if os.path.samefile(current_dir, \
-                        os.path.join(current_dir, os.path.pardir)):
+                if os.path.dirname(current_dir) == current_dir:
                     # we reached the root directory - stop
                     break
                 if max_depth <= 0:
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to