Fix computation of file:// urls from paths
--HG-- branch : WINDOWSPORT
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user