diff options
| author | Michael Wilson | 2014-09-01 17:10:23 +0200 |
|---|---|---|
| committer | Michael Wilson | 2014-09-01 17:10:23 +0200 |
| commit | 8682518876d11d103016f0a9bc65250b3bfa7b81 (patch) | |
| tree | 5f1fb5646258320ec2efb9ecfc6d807af41348bb /Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java | |
| parent | Detailfelder sind nicht mehr editable (diff) | |
| download | tutor-module-8682518876d11d103016f0a9bc65250b3bfa7b81.tar.gz tutor-module-8682518876d11d103016f0a9bc65250b3bfa7b81.tar.xz tutor-module-8682518876d11d103016f0a9bc65250b3bfa7b81.zip | |
(Quick and Dirty) Pfad des letzten Images wir nun nur noch unter Windows-Maschinen gespeichert, nicht unter Linux -> Verhindert Abstürze
Diffstat (limited to 'Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java')
| -rw-r--r-- | Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index 4954f81d..5d679ea5 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -80,7 +80,7 @@ public class FTPEditUploader_GUI extends JFrame implements long filesize; double speed; long bytesread; - boolean fileupload=false; + boolean fileupload = false; boolean taskrun = false; int progress = 0; ThriftConnection con = new ThriftConnection(); @@ -365,14 +365,21 @@ public class FTPEditUploader_GUI extends JFrame implements "C:\\Users\\" + System.getProperty("user.name") + "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini")); - ini.put("main", - "Letzter Uploadpfad", - lblPath.getText() - .substring( - 0, - lblPath.getText() - .lastIndexOf("\\"))); - ini.store(); + + // check if path has content, then write to file + if (lblPath.getText().contains("\\") == true) { + System.out.println("Hole Infos aus Label: " + + lblPath.getText()); + ini.put("main", + "Letzter Uploadpfad", + lblPath.getText().substring( + 0, + lblPath.getText().lastIndexOf( + "\\"))); + ini.store(); + } else { + System.out.println("Mache nix"); + }// end if } catch (InvalidFileFormatException e2) { // TODO Auto-generated catch block e2.printStackTrace(); @@ -511,7 +518,7 @@ public class FTPEditUploader_GUI extends JFrame implements } private void buttonUploadActionPerformed(ActionEvent event) { - fileupload=true; + fileupload = true; progressBar.setValue(0); btnUploadStarten.setEnabled(false); // verhindert einen weiteren klick btnUploadStarten.setText("Bitte warten"); @@ -611,10 +618,10 @@ public class FTPEditUploader_GUI extends JFrame implements Image.image.getVersion(), Image.image.isVorlage(), Image.image.getFilesize(), Image.image.getShareMode(), Image.image.getOS()); - if(fileupload==true){ + if (fileupload == true) { client.startFileCopy(Image.image.getNewName()); } - + } else { client.updateImageData(Image.image.getImagename(), @@ -625,8 +632,8 @@ public class FTPEditUploader_GUI extends JFrame implements Image.image.getImageId(), Image.image.getVersion(), Image.image.isVorlage(), Image.image.getFilesize(), Image.image.getShareMode(), Image.image.getOS()); - - if(fileupload==true){ + + if (fileupload == true) { client.startFileCopy(Image.image.getNewName()); } } @@ -645,7 +652,8 @@ public class FTPEditUploader_GUI extends JFrame implements public boolean isCurrentlyLoading() { isCurrentlyLoading = false; - if (labelverbleibend.getText().equals("0 MB") || labelverbleibend.getText().equals("0")) { + if (labelverbleibend.getText().equals("0 MB") + || labelverbleibend.getText().equals("0")) { isCurrentlyLoading = false; } else { isCurrentlyLoading = true; |
