if possible, it would be convenient if some admin could make this thread sticky scince i will post my updates here.
For the time being, all of these bugfixes refer to the java vnc filetransfer utility.
Fixed Bugs:
- Description:
- Code: Select all
private void doNewFolder() {
String name = JOptionPane.showInputDialog(null,"Enter new directory name", "Create New Directory", JOptionPane.QUESTION_MESSAGE);
//BUGFIX START
// if name is null, the user hit the "cancel"-button. in that case -> do not create folder
if(name == null) {
return;
}
//BUGFIX END
if(selectedTable.equals("remote")) {
name = remoteLocation.getText()+name;
viewer.rfb.createRemoteDirectory(name);
}
else {
name = localLocation.getText()+name;
File f = new File(name);
f.mkdir();
refreshLocalLocation();
historyComboBox.insertItemAt(new String("Created Local Directory: " + name),0);
historyComboBox.setSelectedIndex(0);
}
}
When one tries to create a new folder but hits "cancel" a new folder is created anyway with the name "null".
Reason:
This case simply was not considered.
Solution:
Adjustment of FTPFrame -> doNewFolder():
Status: fixed
- Description:
- Code: Select all
if (dwFileAttributes == 268435456
|| dwFileAttributes == 369098752
|| dwFileAttributes == 285212672
|| dwFileAttributes == 271056896
|| dwFileAttributes == 824705024
|| dwFileAttributes == 807927808
|| dwFileAttributes == 371720192
|| dwFileAttributes == 369623040
//BUGFIX START: ADDED
|| dwFileAttributes == 805306368)
//BUGFIX END
Certain Files are shown as directories and thus can not be transferred.
Cause:
This was a funny one. The reason for this bug was, that all file attributes were checked, except for one: the attribute "ready for archiving".
Solution:
RFBProto -> readFTPMsgDirectoryListContent()
Status: fixed
- Description:
- Code: Select all
private javax.swing.JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new javax.swing.JPanel();
jContentPane.setLayout(new java.awt.BorderLayout());
jContentPane.add(getTopPanel(), java.awt.BorderLayout.NORTH);
jContentPane.add(getStatusPanel(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST);
jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER);
// BUGFIX START
localPanel.setMaximumSize(new Dimension(325,398));
localPanel.setMinimumSize(new Dimension(325,398));
localPanel.setPreferredSize(new Dimension(325,398));
remotePanel.setMaximumSize(new Dimension(325,398));
remotePanel.setMinimumSize(new Dimension(325,398));
remotePanel.setPreferredSize(new Dimension(325,398));
// BUGFIX END
}
return jContentPane;
}
Transferring files to a directory with a very long path lets the inner windows overlap and makes the whole window unusable.
Cause:
The whole JFrame is of fixed size. However, the subcomponents like JPanels etc are not. Obviously, this has to go wrong.....

Solution:
Adjustment of FTPFrame -> getJContentPane()
Status: fixed
- Description:
- Code: Select all
public void printRemoteDirectory(ArrayList a) {
ArrayList files = new ArrayList();
ArrayList dirs = new ArrayList();
for (int i = 0; i < a.size(); i++) {
remoteList.addElement(a.get(i));
}
remoteFileTable.setListData(remoteList);
}- Code: Select all
public void printRemoteDirectory(ArrayList a) {
ArrayList files = new ArrayList();
ArrayList dirs = new ArrayList();
for (Iterator i = a.iterator(); i.hasNext();) {
String name = (String) i.next();
if(name.equals("[..]")) {
remoteList.add(name);
}
// blank before '[' is mandatory!
else if(name.startsWith(" [") && name.endsWith("]")) {
dirs.add(name.substring(2, name.length() - 1));
}
else {
files.add(name);
}
}
Collections.sort(dirs);
Collections.sort(files);
for (Iterator i = dirs.iterator(); i.hasNext();) {
String dirname = (String) i.next();
// blank before '[' is mandatory!
remoteList.add(" [" + dirname + "]");
}
for (Iterator i = files.iterator(); i.hasNext();) {
String filename = (String) i.next();
remoteList.add(filename);
}
remoteFileTable.setListData(remoteList);
}
Directory entries are not sorted. This really is a pain in the ass if you imagine a directory with thousand or more entries and you are looking for one specific file / subdirectory.......
Cause:
Well, there was simply no sorting mechanism implemented:
FTPFrame --> printRemoteDirectory(ArrayList a) looked like that:
Solution:
FTPFrame --> replace printRemoteDirectory(ArrayList a) with:
Status: fixed
- Description:
Directory contents are "double" displayed right after the initialization.
Cause:
I simply don't know.
Solution:
Was fixed as a side effect of the other adjustments i made.
Status: fixed
- Description:
- Code: Select all
else if (evt.getSource() == sendButton) {
doSend();
this.repaint();
}
When creating directories and receiving files the layers or div tags gets resized and the action buttons (Receive, Send, Close etc..) becomes less and less visible > invisible. Then the only thing to do is to disconnect the Remote Session and restart it and then bring up the file transfer window again
Cause:
I have no idea.
Solution:
Adding a "this.repaint()" to actionPerformed(ActionEvent evt) in FTPFrame:
Status: Seems to be fixed (error didn't occur in my recent tests)
This is a weird behaviour and i am not sure why this happens. I am still not able to reproduce this behaviour. Sometimes the exact same transfers worked and sometimes they just didn't.
For now, i consider this fixed unless we see that error again.....
Bugs i am currently working on:
So far, nothing....
New features i am currently working on:
- SSL
- Transfer of directories
- Bringing structure to the application:
So far:
- everything is in the default package
- huge classes having more than 1000 lines of code
Some remarks:
1.)
When i have more time i will update this thread with more information why this bug occured and how i fixed it.
2.)
Is there an official bugtracker available? I didn't find anything like that on this website....