-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 151be84..e1dd582 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -440,17 +440,26 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { QString msg; msg.sprintf("Unable to get working dir\n%s",FtpLastResponse(conn)); QMessageBox::message("Note",msg); } currentRemoteDir=path; } else { - if(strItem.find("/",0,TRUE) != -1) { + if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers + strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE)-3 ); + strItem = strItem.stripWhiteSpace(); + currentRemoteDir = strItem; + if( remoteChDir( (const QString &)strItem) ==0) { + QString msg; + msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); + QMessageBox::message("Note",msg); + } + } else if(strItem.find("/",0,TRUE) != -1) { if( remoteChDir( (const QString &)currentRemoteDir+strItem) ==0) { QString msg; msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); QMessageBox::message("Note",msg); } currentRemoteDir = currentRemoteDir+strItem; } else { qDebug("download "+strItem); |