|
@@ -76,10 +76,17 @@ class labkeyURIHandler(slicer.vtkURIHandler):
|
|
|
except:
|
|
|
if not os.path.isdir(path):
|
|
|
raise
|
|
|
- local=open(dest,'w')
|
|
|
+ local=open(dest,'wb')
|
|
|
#make sure we are at the begining of the file
|
|
|
- remote.seek(0)
|
|
|
+
|
|
|
+ #check file size
|
|
|
+ remote.seek(0,2)
|
|
|
+ sz=remote.tell()
|
|
|
+ print "Remote size: {0}".format(sz)
|
|
|
+
|
|
|
+ remote.seek(0)
|
|
|
shutil.copyfileobj(remote,local)
|
|
|
+ print "Local size: {0}".format(local.tell())
|
|
|
local.close()
|
|
|
|
|
|
def StageFileWrite(self,source,dest):
|