nlopess         Tue Mar  1 11:44:36 2005 EDT

  Modified files:              
    /phpdoc/scripts     file-entities.php.in 
  Log:
  try to fix a problem when using cygwin with phpdoc in the home dir.
  
http://cvs.php.net/diff.php/phpdoc/scripts/file-entities.php.in?r1=1.32&r2=1.33&ty=u
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.32 
phpdoc/scripts/file-entities.php.in:1.33
--- phpdoc/scripts/file-entities.php.in:1.32    Wed Feb  9 19:36:05 2005
+++ phpdoc/scripts/file-entities.php.in Tue Mar  1 11:44:36 2005
@@ -17,7 +17,7 @@
   |             Gabor Hojtsy <[EMAIL PROTECTED]>                              |
   +----------------------------------------------------------------------+
   
-  $Id: file-entities.php.in,v 1.32 2005/02/10 00:36:05 hholzgra Exp $
+  $Id: file-entities.php.in,v 1.33 2005/03/01 16:44:36 nlopess Exp $
 */
 
 /**
@@ -430,7 +430,11 @@
  * @return string windows style path
  */
 function strip_cygdrive($path){
-    return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path);
+
+    if (!eregi('windows', php_uname()))
+        return $path;
+
+    return preg_replace(array('!^/cygdrive/(\w)/!', '@^/home/.+$@'), 
array('\1:/', dirname(dirname(__FILE__))), $path);
 }
 
 

Reply via email to