Commit 7e1f2fec authored by Staiger, Christine's avatar Staiger, Christine
Browse files

Bugfix: Data up and downloads

- Size calculations (was string concatenation)
- loading gif path
parent 83a8baa9
......@@ -45,7 +45,7 @@ class dataTransfer(QDialog, Ui_dataTransferState):
self.confirmBtn.setText("Download")
self.confirmBtn.setEnabled(False)
self.loading_movie = QMovie("gui/icons/loading_circle.gif")
self.loading_movie = QMovie("icons/loading_circle.gif")
self.loadingLbl.setMovie(self.loading_movie)
self.loading_movie.start()
......@@ -64,10 +64,10 @@ class dataTransfer(QDialog, Ui_dataTransferState):
def cancel(self):
print("Thread stopped")
print("DataTransfer: Thread stopped")
self.finished.emit(False, None)
try: # if thread is still running
self.thread.exit(1)
self.thread.exit(1)
except:
pass
self.close()
......@@ -117,15 +117,12 @@ class dataTransfer(QDialog, Ui_dataTransferState):
# Callback for the getDataSize worker
def updateUiWithDataState(self, addFiles, diff, addSize, updateSize):
self.updateSize = updateSize
print(int(addSize), int(updateSize))
#checksumSizeStr = self.bytesToStr(updateSize)
self.ChecksumSizeLbl.setText(self.bytesToStr(int(updateSize)))
self.updateSize = int(updateSize)
self.addSize = int(addSize)
self.ChecksumSizeLbl.setText(self.bytesToStr(self.updateSize))
self.diff = diff
self.addSize = addSize
#newSizeStr = self.bytesToStr(addSize)
self.newFSizeLbl.setText(self.bytesToStr(int(addSize)))
self.newFSizeLbl.setText(self.bytesToStr(self.addSize))
self.addFiles = addFiles
self.loading_movie.stop()
......@@ -216,8 +213,6 @@ class getDataState(QObject):
fullOnlyFsPaths.extend([d for d in onlyFS
if d.startswith('/') or ':' in d])
addSize = getSize(fullOnlyFsPaths)
print(str(fsDiffFiles)+" "+str(updateSize))
print(str(onlyFS)+" "+str(addSize))
self.finished.emit(onlyFS, diff, str(addSize), str(updateSize))
else:
irodsDiffFiles = [d[0] for d in diff]
......
......@@ -105,7 +105,7 @@ class irodsUpDownload(QWidget, Ui_tabUpDownload):
self.createFolderButton.setEnabled(enable)
self.createCollButton.setEnabled(enable)
self.localFsTreeView.setEnabled(enable)
self.localFsTreeView.setEnabled(enable)
self.irodsFsTreeView.setEnabled(enable)
def infoPopup(self, message):
......
......@@ -293,7 +293,7 @@ class irodsConnector():
raise error("RESOURCE ERROR: Either resource does not exist or size not set.")
def uploadData(self, source, destination, resource, size, buff = 1024**3,
def uploadData(self, source, destination, resource, size, buff = 1000**3,
force = False, diffs = []):
"""
source: absolute path to file or folder
......@@ -339,6 +339,9 @@ class irodsConnector():
if not force:
try:
space = self.session.resources.get(resource).free_space
print("Free space:", space)
print("Size", size)
print("Buffer", buff)
if not space:
logging.info(
'ERROR iRODS upload: No size set on iRODS resource. Refuse to upload.',
......
Supports Markdown
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