-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 65 |
1 files changed, 50 insertions, 15 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index faa03dc..bd513c0 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -836,3 +836,2 @@ void AdvancedFm::localDelete() | |||
836 | } | 836 | } |
837 | |||
838 | } | 837 | } |
@@ -1142,4 +1141,10 @@ void AdvancedFm::copy() | |||
1142 | 1141 | ||
1143 | QString destFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1142 | QString destFile = currentRemoteDir.canonicalPath(); |
1144 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1143 | if(destFile.right(1).find("/",0,TRUE) == -1) |
1144 | destFile+="/"; | ||
1145 | destFile +=(*it); | ||
1146 | curFile = currentDir.canonicalPath(); | ||
1147 | if(curFile.right(1).find("/",0,TRUE) == -1) | ||
1148 | curFile +="/"; | ||
1149 | curFile +=(*it); | ||
1145 | QFile f(destFile); | 1150 | QFile f(destFile); |
@@ -1156,4 +1161,10 @@ void AdvancedFm::copy() | |||
1156 | 1161 | ||
1157 | QString destFile = currentDir.canonicalPath()+"/"+(*it); | 1162 | QString destFile = currentDir.canonicalPath(); |
1158 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1163 | if(destFile.right(1).find("/",0,TRUE) == -1) |
1164 | destFile+="/"; | ||
1165 | destFile +=(*it); | ||
1166 | curFile = currentRemoteDir.canonicalPath(); | ||
1167 | if(curFile.right(1).find("/",0,TRUE) == -1) | ||
1168 | curFile +="/"; | ||
1169 | curFile +=(*it); | ||
1159 | QFile f(destFile); | 1170 | QFile f(destFile); |
@@ -1178,4 +1189,7 @@ void AdvancedFm::copyAs() | |||
1178 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1189 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1179 | QString destFile = *it; | 1190 | QString destFile; |
1180 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1191 | curFile = currentDir.canonicalPath(); |
1192 | if(curFile.right(1).find("/",0,TRUE) == -1) | ||
1193 | curFile +="/"; | ||
1194 | curFile+=(*it); | ||
1181 | // InputDialog *fileDlg; | 1195 | // InputDialog *fileDlg; |
@@ -1186,3 +1200,6 @@ void AdvancedFm::copyAs() | |||
1186 | QString filename = fileDlg->LineEdit1->text(); | 1200 | QString filename = fileDlg->LineEdit1->text(); |
1187 | destFile = currentRemoteDir.canonicalPath()+"/"+destFile; | 1201 | destFile = currentRemoteDir.canonicalPath(); |
1202 | if(destFile.right(1).find("/",0,TRUE) == -1) | ||
1203 | destFile+="/"; | ||
1204 | destFile +=(*it); | ||
1188 | 1205 | ||
@@ -1202,4 +1219,7 @@ void AdvancedFm::copyAs() | |||
1202 | 1219 | ||
1203 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1220 | curFile = currentDir.canonicalPath(); |
1204 | QString destFile = *it; | 1221 | if(curFile.right(1).find("/",0,TRUE) == -1) |
1222 | curFile +="/"; | ||
1223 | curFile+=(*it); | ||
1224 | QString destFile; | ||
1205 | fileDlg->setInputText((const QString &) destFile); | 1225 | fileDlg->setInputText((const QString &) destFile); |
@@ -1208,3 +1228,6 @@ void AdvancedFm::copyAs() | |||
1208 | QString filename = fileDlg->LineEdit1->text(); | 1228 | QString filename = fileDlg->LineEdit1->text(); |
1209 | destFile = currentDir.canonicalPath()+"/"+destFile; | 1229 | destFile = currentDir.canonicalPath(); |
1230 | if(destFile.right(1).find("/",0,TRUE) == -1) | ||
1231 | destFile+="/"; | ||
1232 | destFile +=(*it); | ||
1210 | 1233 | ||
@@ -1232,5 +1255,11 @@ void AdvancedFm::move() { | |||
1232 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1255 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1233 | QString destFile = currentRemoteDir.canonicalPath() + "/" + *it; | 1256 | QString destFile = currentRemoteDir.canonicalPath(); |
1234 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1257 | if(destFile.right(1).find("/",0,TRUE) == -1) |
1258 | destFile+="/"; | ||
1259 | destFile +=(*it); | ||
1260 | curFile = currentDir.canonicalPath(); | ||
1235 | qDebug("Destination file is "+destFile); | 1261 | qDebug("Destination file is "+destFile); |
1262 | if(curFile.right(1).find("/",0,TRUE) == -1) | ||
1263 | curFile +="/"; | ||
1264 | curFile+=(*it); | ||
1236 | 1265 | ||
@@ -1248,5 +1277,11 @@ void AdvancedFm::move() { | |||
1248 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1277 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1249 | QString destFile = currentRemoteDir.canonicalPath() + "/" + *it; | 1278 | QString destFile = currentRemoteDir.canonicalPath(); |
1279 | if(destFile.right(1).find("/",0,TRUE) == -1) | ||
1280 | destFile+="/"; | ||
1281 | destFile +=(*it); | ||
1250 | qDebug("Destination file is "+destFile); | 1282 | qDebug("Destination file is "+destFile); |
1251 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1283 | curFile = currentDir.canonicalPath(); |
1284 | if(curFile.right(1).find("/",0,TRUE) == -1) | ||
1285 | curFile +="/"; | ||
1286 | curFile+=(*it); | ||
1252 | 1287 | ||