Fix computation of file:// urls from paths

--HG--
branch : WINDOWSPORT
This commit is contained in:
Jean-Francois Dockes
2015-09-02 09:11:25 +02:00
parent a66209dc6e
commit 8022515a00
8 changed files with 29 additions and 4 deletions
+2 -2
View File
@@ -769,7 +769,7 @@ FsIndexer::processonefile(RclConfig *config,
if (doc.fmtime.empty())
doc.fmtime = ascdate;
if (doc.url.empty())
doc.url = cstr_fileu + fn;
doc.url = path_pathtofileurl(fn);
const string *fnp = 0;
if (doc.ipath.empty()) {
if (!doc.peekmeta(Rcl::Doc::keyfn, &fnp) || fnp->empty())
@@ -865,7 +865,7 @@ FsIndexer::processonefile(RclConfig *config,
fileDoc.meta[Rcl::Doc::keytcfn] = utf8fn;
fileDoc.haschildren = true;
fileDoc.mimetype = mimetype;
fileDoc.url = cstr_fileu + fn;
fileDoc.url = path_pathtofileurl(fn);
if (m_havelocalfields)
setlocalfields(localfields, fileDoc);
char cbuf[100];
+2
View File
@@ -22,6 +22,8 @@
#ifndef _WIN32
#include <sys/time.h>
#include <sys/resource.h>
#else
#include <direct.h>
#endif
#include "safefcntl.h"
#include "safeunistd.h"