Index: misc_util.py
===================================================================
--- misc_util.py	(revision 2090)
+++ misc_util.py	(working copy)
@@ -91,10 +91,10 @@
     """
     if not is_string(path):
         return path
+    if os.sep != '/':
+        path = path.replace('/',os.sep)
     if '..' not in path:
         return path
-    if os.sep != '/':
-        path.replace('/',os.sep)
     l = path.split(os.sep)
     j = 1
     while l:
Index: tests/test_misc_util.py
===================================================================
--- tests/test_misc_util.py	(revision 2090)
+++ tests/test_misc_util.py	(working copy)
@@ -1,4 +1,4 @@
-import sys
+import os, sys
 from numpy.testing import *
 from numpy.distutils.misc_util import appendpath, minrelpath
 from os.path import join, sep
@@ -28,17 +28,20 @@
                      ajoin('prefix','sub','sub2','sup','sup2','name'))
         assert_equal(appendpath('/prefix/sub/sub2','/prefix/sub/sup/name'),
                      ajoin('prefix','sub','sub2','sup','name'))
+
+def normsep(path):
+    return path.replace('/', os.path.sep).replace('\\', os.path.sep) 
 
 class test_minrelpath(ScipyTestCase):
 
     def check_1(self):
-        assert_equal(minrelpath(join('aa/bb')),'aa/bb')
-        assert_equal(minrelpath(join('..')),'..')
-        assert_equal(minrelpath(join('aa/..')),'')
-        assert_equal(minrelpath(join('aa/../bb')),'bb')
-        assert_equal(minrelpath(join('aa/bb/..')),'aa')
-        assert_equal(minrelpath(join('aa/bb/../..')),'')
-        assert_equal(minrelpath(join('aa/bb/../cc/../dd')),'aa/dd')
+        assert_equal(minrelpath('aa/bb'),normsep('aa/bb'))
+        assert_equal(minrelpath('..'),'..')
+        assert_equal(minrelpath('aa/..'),'')
+        assert_equal(minrelpath('aa/../bb'),'bb')
+        assert_equal(minrelpath('aa/bb/..'),'aa')
+        assert_equal(minrelpath('aa/bb/../..'),'')
+        assert_equal(minrelpath('aa/bb/../cc/../dd'),normsep('aa/dd'))
 
 if __name__ == "__main__":
     ScipyTest().run()
