|
a/src/internfile/internfile.cpp |
|
b/src/internfile/internfile.cpp |
|
... |
|
... |
42 |
#include "execmd.h"
|
42 |
#include "execmd.h"
|
43 |
#include "pathut.h"
|
43 |
#include "pathut.h"
|
44 |
#include "wipedir.h"
|
44 |
#include "wipedir.h"
|
45 |
#include "rclconfig.h"
|
45 |
#include "rclconfig.h"
|
46 |
#include "mh_html.h"
|
46 |
#include "mh_html.h"
|
|
|
47 |
#include "fileudi.h"
|
|
|
48 |
|
47 |
#ifdef RCL_USE_XATTR
|
49 |
#ifdef RCL_USE_XATTR
|
48 |
#include "pxattr.h"
|
50 |
#include "pxattr.h"
|
49 |
#endif // RCL_USE_XATTR
|
51 |
#endif // RCL_USE_XATTR
|
50 |
|
52 |
|
51 |
// The internal path element separator. This can't be the same as the rcldb
|
53 |
// The internal path element separator. This can't be the same as the rcldb
|
|
... |
|
... |
83 |
#endif // RCL_USE_XATTR
|
85 |
#endif // RCL_USE_XATTR
|
84 |
|
86 |
|
85 |
// This is used when the user wants to retrieve a search result doc's parent
|
87 |
// This is used when the user wants to retrieve a search result doc's parent
|
86 |
// (ie message having a given attachment)
|
88 |
// (ie message having a given attachment)
|
87 |
bool FileInterner::getEnclosing(const string &url, const string &ipath,
|
89 |
bool FileInterner::getEnclosing(const string &url, const string &ipath,
|
88 |
string &eurl, string &eipath)
|
90 |
string &eurl, string &eipath, string& udi)
|
89 |
{
|
91 |
{
|
90 |
eurl = url;
|
92 |
eurl = url;
|
91 |
eipath = ipath;
|
93 |
eipath = ipath;
|
92 |
string::size_type colon;
|
94 |
string::size_type colon;
|
93 |
LOGDEB(("FileInterner::getEnclosing(): [%s]\n", eipath.c_str()));
|
95 |
LOGDEB(("FileInterner::getEnclosing(): [%s]\n", eipath.c_str()));
|
|
... |
|
... |
96 |
if ((colon = eipath.find_last_of(isep)) != string::npos) {
|
98 |
if ((colon = eipath.find_last_of(isep)) != string::npos) {
|
97 |
eipath.erase(colon);
|
99 |
eipath.erase(colon);
|
98 |
} else {
|
100 |
} else {
|
99 |
eipath.erase();
|
101 |
eipath.erase();
|
100 |
}
|
102 |
}
|
|
|
103 |
make_udi(url_gpath(eurl), eipath, udi);
|
|
|
104 |
|
101 |
LOGDEB(("FileInterner::getEnclosing() after: [%s]\n", eipath.c_str()));
|
105 |
LOGDEB(("FileInterner::getEnclosing() after: [%s]\n", eipath.c_str()));
|
102 |
return true;
|
106 |
return true;
|
103 |
}
|
107 |
}
|
104 |
|
108 |
|
105 |
// Uncompress input file into a temporary one, by executing the appropriate
|
109 |
// Uncompress input file into a temporary one, by executing the appropriate
|