summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/obexftpdialog.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/obexftpdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/obexftpdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opietooth/manager/obexftpdialog.cpp b/noncore/net/opietooth/manager/obexftpdialog.cpp
index efb3ff2..2a578ac 100644
--- a/noncore/net/opietooth/manager/obexftpdialog.cpp
+++ b/noncore/net/opietooth/manager/obexftpdialog.cpp
@@ -222,49 +222,49 @@ void ObexFtpDialog::status(const char* msg)
222 */ 222 */
223void ObexFtpDialog::slotCd(QListViewItem* item) 223void ObexFtpDialog::slotCd(QListViewItem* item)
224{ 224{
225 FileListItem* file = (FileListItem*)item; 225 FileListItem* file = (FileListItem*)item;
226 int idx; 226 int idx;
227 if (file == NULL) 227 if (file == NULL)
228 return; 228 return;
229 odebug << "Item " << file->text(0) << " clicked" << oendl; 229 odebug << "Item " << file->text(0) << " clicked" << oendl;
230 if (file->gettype() == IS_DIR) { 230 if (file->gettype() == IS_DIR) {
231 if (file->text(0) == "../") { 231 if (file->text(0) == "../") {
232 if (curdir.right(1) == "/") 232 if (curdir.right(1) == "/")
233 curdir.remove(curdir.length() - 1, 1); 233 curdir.remove(curdir.length() - 1, 1);
234 idx = curdir.findRev('/'); 234 idx = curdir.findRev('/');
235 if (idx >= 0) 235 if (idx >= 0)
236 curdir.remove(idx, curdir.length() - idx); 236 curdir.remove(idx, curdir.length() - idx);
237 else 237 else
238 curdir = ""; 238 curdir = "";
239 } 239 }
240 else { 240 else {
241 if (curdir != "" && curdir.right(1) != "/") 241 if (curdir != "" && curdir.right(1) != "/")
242 curdir += "/"; 242 curdir += "/";
243 curdir += file->text(0); 243 curdir += file->text(0);
244 } 244 }
245 odebug << "Browse " << curdir << oendl; 245 odebug << "Browse " << curdir << oendl;
246 if (obexftp_setpath(client, curdir, 0) < 0) 246 if (obexftp_setpath(client, QFile::encodeName(curdir), 0) < 0)
247 log(tr("CD failed: ") + tr(strerror(errno))); 247 log(tr("CD failed: ") + tr(strerror(errno)));
248 doBrowse(); 248 doBrowse();
249 } 249 }
250} 250}
251 251
252/* 252/*
253 * Copy file from a remote device to the local device 253 * Copy file from a remote device to the local device
254 */ 254 */
255void ObexFtpDialog::getFile() 255void ObexFtpDialog::getFile()
256{ 256{
257 FileListItem* file = (FileListItem*)fileList->selectedItem(); 257 FileListItem* file = (FileListItem*)fileList->selectedItem();
258 int result; 258 int result;
259 if (file == NULL) 259 if (file == NULL)
260 return; 260 return;
261 file2get = "/"; 261 file2get = "/";
262 local = localCurdir; 262 local = localCurdir;
263 if (local == "") { 263 if (local == "") {
264 errBox("Select a destination first"); 264 errBox("Select a destination first");
265 return; 265 return;
266 } 266 }
267 if (local.right(1) != "/") 267 if (local.right(1) != "/")
268 local += "/"; 268 local += "/";
269 if (file->gettype() == IS_FILE) { 269 if (file->gettype() == IS_FILE) {
270 if (client == NULL) { 270 if (client == NULL) {