aboutsummaryrefslogtreecommitdiff
path: root/x11-fm/krusader2/files/patch-filehandling
blob: 47937184794760d7a6b39255227827fe3b9cf6c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
Index: ./krusader/Dialogs/checksumdlg.cpp
===================================================================
--- ./krusader/Dialogs/checksumdlg.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/checksumdlg.cpp	(Arbeitskopie)
@@ -49,7 +49,7 @@
 
 class CS_Tool; // forward
 typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const QStringList& files,
-                               const QString checksumFile, bool recursive, const QString& type = QString());
+                               const QString checksumFile, bool recursive, const QString& type);
 typedef QStringList GET_FAILED_FUNC(const QStringList& stdOut, const QStringList& stdErr);
 
 class CS_Tool
Index: ./krusader/Dialogs/krdialogs.cpp
===================================================================
--- ./krusader/Dialogs/krdialogs.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/krdialogs.cpp	(Arbeitskopie)
@@ -59,7 +59,7 @@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@ -87,7 +87,7 @@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@ -115,7 +115,7 @@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@ -146,7 +146,7 @@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
Index: ./krusader/Dialogs/popularurls.cpp
===================================================================
--- ./krusader/Dialogs/popularurls.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/popularurls.cpp	(Arbeitskopie)
@@ -352,7 +352,7 @@
     for (it = list.begin(); it != list.end(); ++it) {
         QTreeWidgetItem *item = new QTreeWidgetItem(urls, lastItem);
         lastItem = item;
-        item->setText(0, (*it).isLocalFile() ? (*it).path() : (*it).prettyUrl());
+        item->setText(0, (*it).isLocalFile() ? (*it).toLocalFile() : (*it).prettyUrl());
         item->setIcon(0, (*it).isLocalFile() ? SmallIcon("folder") : SmallIcon("folder-html"));
     }
 
Index: ./krusader/BookMan/krbookmarkhandler.cpp
===================================================================
--- ./krusader/BookMan/krbookmarkhandler.cpp	(Revision 1051213)
+++ ./krusader/BookMan/krbookmarkhandler.cpp	(Arbeitskopie)
@@ -367,7 +367,7 @@
             KUrl::List::Iterator it;
             for (it = list.begin(); it != list.end(); ++it) {
                 QString name;
-                if ((*it).isLocalFile()) name = (*it).path();
+                if ((*it).isLocalFile()) name = (*it).toLocalFile();
                 else name = (*it).prettyUrl();
                 // note: these bookmark are put into the private collection
                 // as to not spam the general collection
Index: ./krusader/Synchronizer/synchronizertask.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizertask.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizertask.cpp	(Arbeitskopie)
@@ -141,16 +141,16 @@
     m_state = ST_STATE_PENDING;
 
     if (leftURL.isLocalFile() && rightURL.isLocalFile()) {
-        leftFile = new QFile(leftURL.path());
+        leftFile = new QFile(leftURL.toLocalFile());
         if (!leftFile->open(QIODevice::ReadOnly)) {
-            KMessageBox::error(parentWidget, i18n("Error at opening %1!", leftURL.path()));
+            KMessageBox::error(parentWidget, i18n("Error at opening %1!", leftURL.toLocalFile()));
             m_state = ST_STATE_ERROR;
             return;
         }
 
         rightFile = new QFile(rightURL.path());
         if (!rightFile->open(QIODevice::ReadOnly)) {
-            KMessageBox::error(parentWidget, i18n("Error at opening %1!", rightURL.path()));
+            KMessageBox::error(parentWidget, i18n("Error at opening %1!", rightURL.toLocalFile()));
             m_state = ST_STATE_ERROR;
             return;
         }
Index: ./krusader/Synchronizer/synchronizerdirlist.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizerdirlist.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizerdirlist.cpp	(Arbeitskopie)
@@ -127,7 +127,7 @@
     }
 
     if (url.isLocalFile()) {
-        QString path = url.path(KUrl::RemoveTrailingSlash);
+        QString path = url.toLocalFile(KUrl::RemoveTrailingSlash);
         DIR* dir = opendir(path.toLocal8Bit());
         if (!dir)  {
             KMessageBox::error(parentWidget, i18n("Can't open the %1 directory!", path), i18n("Error"));
Index: ./krusader/Synchronizer/synchronizer.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizer.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizer.cpp	(Arbeitskopie)
@@ -1031,7 +1031,7 @@
                     timestamp.actime = time(0);
                     timestamp.modtime = item->rightDate() - timeOffset;
 
-                    utime((const char *)(leftURL.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                    utime((const char *)(leftURL.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
 
                     uid_t newOwnerID = (uid_t) - 1; // chown(2) : -1 means no change
                     if (!item->rightOwner().isEmpty()) {
@@ -1068,7 +1068,7 @@
                     timestamp.actime = time(0);
                     timestamp.modtime = item->leftDate() + timeOffset;
 
-                    utime((const char *)(rightURL.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                    utime((const char *)(rightURL.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
 
                     uid_t newOwnerID = (uid_t) - 1; // chown(2) : -1 means no change
                     if (!item->leftOwner().isEmpty()) {
Index: ./krusader/VFS/vfs.cpp
===================================================================
--- ./krusader/VFS/vfs.cpp	(Revision 1051213)
+++ ./krusader/VFS/vfs.cpp	(Arbeitskopie)
@@ -97,7 +97,7 @@
 QString vfs::pathOrUrl(const KUrl &originIn, KUrl::AdjustPathOption trailingSlash)
 {
     if (originIn.isLocalFile())
-        return originIn.path(trailingSlash);
+        return originIn.toLocalFile(trailingSlash);
     return originIn.prettyUrl(trailingSlash);
 }
 
@@ -300,7 +300,7 @@
     kds_totalDirs  = totalDirs;
 
     if (url.isLocalFile()) {
-        vfs_calcSpaceLocal(url.path(KUrl::RemoveTrailingSlash), totalSize, totalFiles, totalDirs, stop);
+        vfs_calcSpaceLocal(url.toLocalFile(KUrl::RemoveTrailingSlash), totalSize, totalFiles, totalDirs, stop);
         return;
     } else {
         stat_busy = true;
Index: ./krusader/VFS/virt_vfs.cpp
===================================================================
--- ./krusader/VFS/virt_vfs.cpp	(Revision 1051213)
+++ ./krusader/VFS/virt_vfs.cpp	(Arbeitskopie)
@@ -267,7 +267,7 @@
     // get file statistics
     QString name;
     if (url.isLocalFile())
-        name = url.path();
+        name = url.toLocalFile();
     else
         name = url.prettyUrl();
 
Index: ./krusader/VFS/abstractthreadedjob.cpp
===================================================================
--- ./krusader/VFS/abstractthreadedjob.cpp	(Revision 1051213)
+++ ./krusader/VFS/abstractthreadedjob.cpp	(Arbeitskopie)
@@ -392,7 +392,7 @@
 QString AbstractJobThread::tempFileIfRemote(const KUrl &kurl, const QString &type)
 {
     if (kurl.isLocalFile()) {
-        return kurl.path();
+        return kurl.toLocalFile();
     }
 
     _tempFile = new KTemporaryFile();
@@ -409,7 +409,7 @@
 QString AbstractJobThread::tempDirIfRemote(const KUrl &kurl)
 {
     if (kurl.isLocalFile()) {
-        return kurl.path(KUrl::RemoveTrailingSlash);
+        return kurl.toLocalFile(KUrl::RemoveTrailingSlash);
     }
 
     _tempDir = new KTempDir();
Index: ./krusader/VFS/krquery.cpp
===================================================================
--- ./krusader/VFS/krquery.cpp	(Revision 1051213)
+++ ./krusader/VFS/krquery.cpp	(Arbeitskopie)
@@ -241,7 +241,7 @@
         timer.start();
 
         if (vf->vfile_getUrl().isLocalFile()) {
-            if (!containsContent(vf->vfile_getUrl().path())) return false;
+            if (!containsContent(vf->vfile_getUrl().toLocalFile())) return false;
         } else {
             if (containOnRemote) {
                 if (processEventsConnected == 0) return false;
Index: ./krusader/VFS/preserveattrcopyjob.cpp
===================================================================
--- ./krusader/VFS/preserveattrcopyjob.cpp	(Revision 1051213)
+++ ./krusader/VFS/preserveattrcopyjob.cpp	(Arbeitskopie)
@@ -1096,7 +1096,7 @@
         if (uDest.isLocalFile()) {
             // if the source is a devices url, handle it a littlebit special
 
-            QString path = uDest.path();
+            QString path = uDest.toLocalFile();
             //kDebug(7007) << "PreserveAttrCopyJob::copyNextFile path=" << path;
             QFile f(path);
             if (f.open(QIODevice::ReadWrite)) {
@@ -1286,7 +1286,7 @@
         for (; it != m_directoriesCopied.end() ; ++it) {
             const KUrl& url = (*it).uDest;
             if (url.isLocalFile() && (*it).mtime != (time_t) - 1) {
-                const QByteArray path = QFile::encodeName(url.path());
+                const QByteArray path = QFile::encodeName(url.toLocalFile());
                 KDE_struct_stat statbuf;
                 if (KDE_lstat(path, &statbuf) == 0) {
                     struct utimbuf utbuf;
@@ -1401,8 +1401,8 @@
                  err == ERR_DIR_ALREADY_EXIST ||
                  err == ERR_IDENTICAL_FILES)) {
             //kDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls";
-            QByteArray _src(QFile::encodeName(m_currentSrcURL.path()));
-            QByteArray _dest(QFile::encodeName(dest.path()));
+            QByteArray _src(QFile::encodeName(m_currentSrcURL.toLocalFile()));
+            QByteArray _dest(QFile::encodeName(dest.toLocalFile()));
             KTemporaryFile tmpFile;
             tmpFile.setPrefix(m_currentSrcURL.directory(KUrl::ObeyTrailingSlash));
             tmpFile.setAutoRemove(false);
@@ -1473,13 +1473,13 @@
 
                 KDE_struct_stat stat_buf;
                 if (m_currentSrcURL.isLocalFile() &&
-                        KDE_stat(QFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0) {
+                        KDE_stat(QFile::encodeName(m_currentSrcURL.toLocalFile()), &stat_buf) == 0) {
                     sizeSrc = stat_buf.st_size;
                     ctimeSrc = stat_buf.st_ctime;
                     mtimeSrc = stat_buf.st_mtime;
                 }
                 if (dest.isLocalFile() &&
-                        KDE_stat(QFile::encodeName(dest.path()), &stat_buf) == 0) {
+                        KDE_stat(QFile::encodeName(dest.toLocalFile()), &stat_buf) == 0) {
                     sizeDest = stat_buf.st_size;
                     ctimeDest = stat_buf.st_ctime;
                     mtimeDest = stat_buf.st_mtime;
@@ -1655,11 +1655,11 @@
 
         if ((*it).uSource.isLocalFile()) {
             KDE_struct_stat stat_p;
-            KDE_lstat((*it).uSource.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), &stat_p);    /* getting the date information */
+            KDE_lstat((*it).uSource.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), &stat_p);    /* getting the date information */
 
             QString aclStr;
 #ifdef HAVE_POSIX_ACL
-            acl_t acl = acl_get_file((*it).uSource.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS);
+            acl_t acl = acl_get_file((*it).uSource.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS);
 
             bool aclExtended = false;
             if (acl) {
@@ -1717,7 +1717,7 @@
         QString path = to.path(KUrl::RemoveTrailingSlash);
 
         for (; i != directoriesToStamp.count(); i++)  // sort the URL-s to avoid parent time stamp modification
-            if (path >= directoriesToStamp[ i ].path(KUrl::RemoveTrailingSlash))
+            if (path >= directoriesToStamp[ i ].toLocalFile(KUrl::RemoveTrailingSlash))
                 break;
 
         if (i != directoriesToStamp.count()) {
@@ -1740,22 +1740,22 @@
                 timestamp.actime  = time(0);
                 timestamp.modtime = mtime;
 
-                ::utime((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                ::utime((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
             }
 
             if (attrs.uid != (uid_t) - 1)
-                ::chown((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.uid, (gid_t) - 1);
+                ::chown((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.uid, (gid_t) - 1);
             if (attrs.gid != (gid_t) - 1)
-                ::chown((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), (uid_t) - 1, attrs.gid);
+                ::chown((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), (uid_t) - 1, attrs.gid);
 
             if (attrs.mode != (mode_t) - 1)
-                ::chmod((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.mode);
+                ::chmod((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.mode);
 
 #ifdef HAVE_POSIX_ACL
             if (!attrs.acl.isNull()) {
                 acl_t acl = acl_from_text(attrs.acl.toLatin1());
                 if (acl && !acl_valid(acl))
-                    acl_set_file(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS, acl);
+                    acl_set_file(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS, acl);
                 if (acl)
                     acl_free(acl);
             }
Index: ./krusader/krslots.cpp
===================================================================
--- ./krusader/krslots.cpp	(Revision 1051213)
+++ ./krusader/krslots.cpp	(Arbeitskopie)
@@ -205,7 +205,7 @@
                 KMessageBox::sorry(krApp, i18n("Krusader is unable to download %1", url1.fileName()));
                 return;
             }
-        } else tmp1 = url1.path();
+        } else tmp1 = url1.toLocalFile();
         if (!url2.isLocalFile()) {
             if (!KIO::NetAccess::download(url2, tmp2, 0)) {
                 KMessageBox::sorry(krApp, i18n("Krusader is unable to download %1", url2.fileName()));
@@ -213,11 +213,11 @@
                     KIO::NetAccess::removeTempFile(tmp1);
                 return;
             }
-        } else tmp2 = url2.path();
+        } else tmp2 = url2.toLocalFile();
     }
 
-    KrProcess *p = new KrProcess(tmp1 != url1.path() ? tmp1 : QString(),
-                                 tmp2 != url2.path() ? tmp2 : QString());
+    KrProcess *p = new KrProcess(tmp1 != url1.toLocalFile() ? tmp1 : QString(),
+                                 tmp2 != url2.toLocalFile() ? tmp2 : QString());
     *p << diffProg << tmp1 << tmp2;
     p->start();
     if (!p->waitForStarted())
Index: ./krusader/paneltabbar.cpp
===================================================================
--- ./krusader/paneltabbar.cpp	(Revision 1051213)
+++ ./krusader/paneltabbar.cpp	(Arbeitskopie)
@@ -35,7 +35,7 @@
 #include "Panel/listpanel.h"
 #include "defaults.h"
 
-#define DISPLAY(X) (X.isLocalFile() ? X.path() : X.prettyUrl())
+#define DISPLAY(X) (X.isLocalFile() ? X.toLocalFile() : X.prettyUrl())
 
 PanelTabBar::PanelTabBar(QWidget *parent): KTabBar(parent), _maxTabLength(0)
 {
Index: ./krusader/main.cpp
===================================================================
--- ./krusader/main.cpp	(Revision 1051213)
+++ ./krusader/main.cpp	(Arbeitskopie)
@@ -75,7 +75,7 @@
 
     bool hasIcon = false;
     int i = 0;
-    char * myArgv[argc+2];
+    char **myArgv = new char *[argc+2];
 
 // if no --miniicon is given, --icon is used. So we don't need to check for --miniicon separately
     for (i = 0; i < argc; ++i) {
@@ -85,7 +85,7 @@
 
     static const char* const icon_text = "--icon";
     const char* icon_name = Krusader::privIcon();
-    char addedParams[strlen(icon_text)+strlen(icon_name)+2];
+    char *addedParams = new char[strlen(icon_text)+strlen(icon_name)+2];
 
     if (! hasIcon) {
         for (i = 0; i < argc; ++i)
@@ -223,6 +223,8 @@
     if (reply.isValid() && (bool)reply) {
         fprintf(stderr, "%s", i18n("Application already running!\n").toLocal8Bit().data());
         KStartupInfo::appStarted();
+        delete [] addedParams;
+        delete [] myArgv;
         return 1;
     }
 
@@ -268,4 +270,6 @@
 
     // let's go.
     return app.exec();
+    delete [] addedParams;
+    delete [] myArgv;  
 }
Index: ./krusader/Panel/panelfunc.cpp
===================================================================
--- ./krusader/Panel/panelfunc.cpp	(Revision 1051213)
+++ ./krusader/Panel/panelfunc.cpp	(Arbeitskopie)
@@ -803,12 +803,12 @@
     } else if (url.isLocalFile()) {
         bool encrypted;
         QString mime = vf->vfile_getMime();
-        QString type = KRarcHandler::getType(encrypted, url.path(), mime, false);
+        QString type = KRarcHandler::getType(encrypted, url.toLocalFile(), mime, false);
 
         if (KRarcHandler::arcSupported(type)) {    // archive autodetection
             // here we check whether KDE supports tar
             if (type == "-tlz") {
-                KTar tapeArchive(url.path());
+                KTar tapeArchive(url.toLocalFile());
                 if (tapeArchive.open(QIODevice::ReadOnly))
                     url.setProtocol("tar");
                 else
@@ -909,7 +909,7 @@
     KTemporaryFile *tempDestFile = 0;
     QString arcFile;
     if (destURL.isLocalFile())
-        arcFile = destURL.path();
+        arcFile = destURL.toLocalFile();
     else if (destURL.protocol() == "virt") {
         KMessageBox::error(krApp, i18n("Cannot pack files onto a virtual destination!"));
         return;
Index: ./krusader/krservices.cpp
===================================================================
--- ./krusader/krservices.cpp	(Revision 1051213)
+++ ./krusader/krservices.cpp	(Arbeitskopie)
@@ -209,7 +209,7 @@
 
 QString KrServices::getPath(const KUrl & url, KUrl::AdjustPathOption trailing)
 {
-    QString path = url.path(trailing);
+	QString path = url.isLocalFile() ? url.toLocalFile() : url.path(trailing);
     REPLACE_DIR_SEP2(path);
 
 #ifdef Q_WS_WIN
Index: ./krusader/KViewer/krviewer.cpp
===================================================================
--- ./krusader/KViewer/krviewer.cpp	(Revision 1051213)
+++ ./krusader/KViewer/krviewer.cpp	(Arbeitskopie)
@@ -313,7 +313,7 @@
         // if the file is local, pass a normal path and not a url. this solves
         // the problem for editors that aren't url-aware
         if (url.isLocalFile())
-            proc << edit.split(' ') << url.path();
+            proc << edit.split(' ') << url.toLocalFile();
         else
             proc << edit.split(' ') << url.prettyUrl();
         if (!proc.startDetached())
@@ -764,7 +764,7 @@
                 KMessageBox::sorry(this, i18n("KrViewer is unable to download: ") + url.url());
                 return ;
             }
-        } else file = url.path();
+        } else file = url.toLocalFile();
 
 
         // create a hex file
Index: ./krusader/KViewer/lister.cpp
===================================================================
--- ./krusader/KViewer/lister.cpp	(Revision 1051213)
+++ ./krusader/KViewer/lister.cpp	(Arbeitskopie)
@@ -1241,7 +1241,7 @@
     _fileSize = 0;
 
     if (listerUrl.isLocalFile()) {
-        _filePath = listerUrl.path();
+        _filePath = listerUrl.toLocalFile();
         if (!QFile::exists(_filePath))
             return false;
         _fileSize = getFileSize();
Index: ./krArc/krarc.cpp
===================================================================
--- ./krArc/krarc.cpp	(Revision 1051213)
+++ ./krArc/krarc.cpp	(Arbeitskopie)
@@ -62,8 +62,12 @@
         f.close();                \
     } while(0);
 #else
+#ifdef _MSC_VER
+#define KRDEBUG(X)
+#else
 #define KRDEBUG(X...)
 #endif
+#endif
 
 using namespace KIO;
 extern "C"
@@ -1861,7 +1865,7 @@
 
 QString kio_krarcProtocol::getPath(const KUrl & url, KUrl::AdjustPathOption trailing)
 {
-    QString path = url.path(trailing);
+	QString path = url.isLocalFile() ? url.toLocalFile(trailing) : url.path(trailing);
     REPLACE_DIR_SEP2(path);
 
 #ifdef Q_WS_WIN