From c10fa05d94418620a08f25fc8d1436a2787f1446 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 12 Mar 2002 02:40:58 +0000 Subject: added kludge for handling symlinks on remote server --- (limited to 'noncore/net') 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 @@ -445,7 +445,16 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) } 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)); -- cgit v0.9.0.2