Commit b50751a2 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Windows compatibility

parent dc965dc8
......@@ -137,6 +137,7 @@ def imcp(src,
img = nib.load(src)
nib.save(img, dest)
img = None
if move:
# if input is an image pair, we
......
......@@ -65,7 +65,7 @@ def shallowest(path, suffixes):
path = path.strip()
# We've reached the root of the file system
if path == op.sep or path == '':
if path == op.sep or path == '' or op.splitdrive(path)[1] == '':
return None
path = path.rstrip(op.sep)
......
......@@ -6,6 +6,9 @@
#
"""This module provides some functions for running shell commands.
.. note:: The functions in this module are only known to work in Unix-like
environments.
.. autosummary::
:nosignatures:
......
......@@ -91,7 +91,6 @@ import os
import re
import sys
import glob
import shutil
import random
import string
import fnmatch
......@@ -864,6 +863,7 @@ class _FileOrThing(object):
fval = self.__load(fullpath)
if fval is not None:
prefixed = self.__removeExt(prefixed)
prefPat = prefPat.replace('\\', '\\\\')
prefixed = re.sub('^' + prefPat, prefName, prefixed)
result[prefixed] = fval
break
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment