summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-01-04 21:40:06 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-01-04 21:40:06 (GMT)
commit0bce21243175200928e6c3a3c64e36a5e248a753 (patch)
tree9d941dfcd9e6d3fbf6661f3799e2d4235d97ae44 /idrop-lite
parentd224077fa27e332aad3682b88483edb8a811f2aa (diff)
downloadQCG-Data-0bce21243175200928e6c3a3c64e36a5e248a753.zip
QCG-Data-0bce21243175200928e6c3a3c64e36a5e248a753.tar.gz
QCG-Data-0bce21243175200928e6c3a3c64e36a5e248a753.tar.bz2
[#582] windows testing: upload mode - fixed bug where progress bar does not update if file moved to table with button rather than DnD
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java19
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java4
2 files changed, 22 insertions, 1 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
index 188c443..0dc7169 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/LocalFileUtils.java
@@ -37,4 +37,23 @@ public class LocalFileUtils {
return filePath;
}
+
+public static String makeLocalFilePath(TreePath treePath, Object drive) {
+
+ String filePath = "";
+ String truncDrive = "";
+
+ for(Object node: treePath.getPath()) {
+ if(node.toString().equals("/")) continue;
+ filePath += System.getProperty("file.separator") + node.toString();
+ }
+
+ if (drive != null) {
+ truncDrive = drive.toString().substring(0, drive.toString().length()-1);
+ return truncDrive + filePath;
+ }
+ else {
+ return filePath;
+ }
+ }
}
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
index c75d176..c862873 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
@@ -2274,9 +2274,11 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
Boolean isFolder = false;
TreePath [] paths = fileUploadTree.getSelectionPaths();
+ Object selectedDrive = lstUploadLocalDrives.getSelectedValue();
for(TreePath path: paths) {
DefaultTableModel tm = (DefaultTableModel)tblUploadTable1.getModel();
- String filePath = LocalFileUtils.makeLocalFilePath(path);
+ // need to add selected drive to make file transfer work properly in windows browser
+ String filePath = LocalFileUtils.makeLocalFilePath(path, selectedDrive);
File localFile = new File(filePath);
if(localFile.isDirectory()) {
isFolder = true;