-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 | |||
@@ -436,25 +436,34 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | |||
436 | QString msg; | 436 | QString msg; |
437 | msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); | 437 | msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); |
438 | QMessageBox::message("Note",msg); | 438 | QMessageBox::message("Note",msg); |
439 | } | 439 | } |
440 | char path[256]; | 440 | char path[256]; |
441 | if( FtpPwd( path,sizeof(path),conn) == 0) { | 441 | if( FtpPwd( path,sizeof(path),conn) == 0) { |
442 | QString msg; | 442 | QString msg; |
443 | msg.sprintf("Unable to get working dir\n%s",FtpLastResponse(conn)); | 443 | msg.sprintf("Unable to get working dir\n%s",FtpLastResponse(conn)); |
444 | QMessageBox::message("Note",msg); | 444 | QMessageBox::message("Note",msg); |
445 | } | 445 | } |
446 | currentRemoteDir=path; | 446 | currentRemoteDir=path; |
447 | } else { | 447 | } else { |
448 | if(strItem.find("/",0,TRUE) != -1) { | 448 | if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers |
449 | strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE)-3 ); | ||
450 | strItem = strItem.stripWhiteSpace(); | ||
451 | currentRemoteDir = strItem; | ||
452 | if( remoteChDir( (const QString &)strItem) ==0) { | ||
453 | QString msg; | ||
454 | msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); | ||
455 | QMessageBox::message("Note",msg); | ||
456 | } | ||
457 | } else if(strItem.find("/",0,TRUE) != -1) { | ||
449 | if( remoteChDir( (const QString &)currentRemoteDir+strItem) ==0) { | 458 | if( remoteChDir( (const QString &)currentRemoteDir+strItem) ==0) { |
450 | QString msg; | 459 | QString msg; |
451 | msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); | 460 | msg.sprintf("Unable to change directories \n%s",FtpLastResponse(conn)); |
452 | QMessageBox::message("Note",msg); | 461 | QMessageBox::message("Note",msg); |
453 | } | 462 | } |
454 | currentRemoteDir = currentRemoteDir+strItem; | 463 | currentRemoteDir = currentRemoteDir+strItem; |
455 | } else { | 464 | } else { |
456 | qDebug("download "+strItem); | 465 | qDebug("download "+strItem); |
457 | } | 466 | } |
458 | } | 467 | } |
459 | if(currentRemoteDir.right(1) !="/") | 468 | if(currentRemoteDir.right(1) !="/") |
460 | currentRemoteDir +="/"; | 469 | currentRemoteDir +="/"; |