X-Git-Url: https://git.rkrishnan.org/?a=blobdiff_plain;f=src%2Fallmydata%2Futil%2Ffileutil.py;h=1d059fcce883e9cba523f384930d2b07d5357b3d;hb=130559f1277be7056e2e9005abe5af6e6b4d5dc5;hp=857d3ebc12dce4fc96a7129dc74b34d03f416880;hpb=53ff3597ec874a66f9f2f0162a0b0bf9737c99d6;p=tahoe-lafs%2Ftahoe-lafs.git diff --git a/src/allmydata/util/fileutil.py b/src/allmydata/util/fileutil.py index 857d3ebc..1d059fcc 100644 --- a/src/allmydata/util/fileutil.py +++ b/src/allmydata/util/fileutil.py @@ -546,8 +546,12 @@ if sys.platform == "win32": # def flush_volume(path): - drive = os.path.splitdrive(os.path.realpath(path))[0] + abspath = os.path.realpath(path) + if abspath.startswith("\\\\?\\"): + abspath = abspath[4 :] + drive = os.path.splitdrive(abspath)[0] + print "flushing %r" % (drive,) hVolume = CreateFileW(u"\\\\.\\" + drive, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,