-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a378170..e3ab76b 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -833,65 +833,65 @@ void AdvancedFm::localDelete() | |||
833 | // exit | 833 | // exit |
834 | break; | 834 | break; |
835 | }; | 835 | }; |
836 | 836 | ||
837 | } else { | 837 | } else { |
838 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f | 838 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f |
839 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { | 839 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { |
840 | case 0: { | 840 | case 0: { |
841 | QString cmd="rm "+f; | 841 | QString cmd="rm "+f; |
842 | QFile file(f); | 842 | QFile file(f); |
843 | file.remove(); | 843 | file.remove(); |
844 | // system( cmd.latin1()); | 844 | // system( cmd.latin1()); |
845 | populateLocalView(); | 845 | populateLocalView(); |
846 | } | 846 | } |
847 | break; | 847 | break; |
848 | case 1: | 848 | case 1: |
849 | // exit | 849 | // exit |
850 | break; | 850 | break; |
851 | }; | 851 | }; |
852 | } | 852 | } |
853 | } | 853 | } |
854 | } | 854 | } |
855 | 855 | ||
856 | void AdvancedFm::remoteDelete() | 856 | void AdvancedFm::remoteDelete() |
857 | { | 857 | { |
858 | QStringList curFileList = getPath(); | 858 | QStringList curFileList = getPath(); |
859 | QString myFile; | 859 | QString myFile; |
860 | 860 | ||
861 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 861 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
862 | myFile = (*it); | 862 | myFile = (*it); |
863 | if(myFile.find(" -> ",0,TRUE) != -1) | 863 | if(myFile.find(" -> ",0,TRUE) != -1) |
864 | myFile = myFile.left(myFile.find(" -> ",0,TRUE)); | 864 | myFile = myFile.left(myFile.find(" -> ",0,TRUE)); |
865 | QString f = currentDir.canonicalPath(); | 865 | QString f = currentRemoteDir.canonicalPath(); |
866 | if(f.right(1).find("/",0,TRUE) == -1) | 866 | if(f.right(1).find("/",0,TRUE) == -1) |
867 | f+="/"; | 867 | f+="/"; |
868 | f+=myFile; | 868 | f+=myFile; |
869 | if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) { | 869 | if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) { |
870 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ | 870 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ |
871 | "\nand all it's contents ?", | 871 | "\nand all it's contents ?", |
872 | tr("Yes"),tr("No"),0,0,1) ) { | 872 | tr("Yes"),tr("No"),0,0,1) ) { |
873 | case 0: { | 873 | case 0: { |
874 | f=f.left(f.length()-1); | 874 | f=f.left(f.length()-1); |
875 | QString cmd="rm -rf "+f; | 875 | QString cmd="rm -rf "+f; |
876 | system( cmd.latin1()); | 876 | system( cmd.latin1()); |
877 | populateRemoteView(); | 877 | populateRemoteView(); |
878 | } | 878 | } |
879 | break; | 879 | break; |
880 | case 1: | 880 | case 1: |
881 | // exit | 881 | // exit |
882 | break; | 882 | break; |
883 | }; | 883 | }; |
884 | 884 | ||
885 | } else { | 885 | } else { |
886 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f | 886 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f |
887 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { | 887 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { |
888 | case 0: { | 888 | case 0: { |
889 | QString cmd="rm "+f; | 889 | QString cmd="rm "+f; |
890 | QFile file(f); | 890 | QFile file(f); |
891 | file.remove(); | 891 | file.remove(); |
892 | // system( cmd.latin1()); | 892 | // system( cmd.latin1()); |
893 | populateRemoteView(); | 893 | populateRemoteView(); |
894 | } | 894 | } |
895 | break; | 895 | break; |
896 | case 1: | 896 | case 1: |
897 | // exit | 897 | // exit |