Commit ce83d6b3 authored by Elvin Sindrilaru's avatar Elvin Sindrilaru
Browse files

MGM: Make # the separator between multiple xattr key-value pairs for the eos.xattr option

parent 69ae23ce
Pipeline #996563 failed with stages
in 18 minutes and 21 seconds
......@@ -1068,7 +1068,7 @@ XrdMgmOfsFile::open(const char* inpath,
if (openOpaque->Get("eos.xattr")) {
std::vector<std::string> xattr_keys;
eos::common::StringConversion::GetKeyValueMap(openOpaque->Get("eos.xattr"),
ext_xattr_map, "=", "&", &xattr_keys);
ext_xattr_map, "=", "#", &xattr_keys);
for (auto it = xattr_keys.begin(); it != xattr_keys.end(); ++it) {
if (it->substr(0, 5) != "user.") {
......@@ -1118,15 +1118,14 @@ XrdMgmOfsFile::open(const char* inpath,
}
if (isCreation) {
// store the birth time as an extended attribute
// store the birth time as an extended attribute
eos::IFileMD::ctime_t ctime;
fmd->getCTime(ctime);
char btime[256];
snprintf(btime, sizeof(btime), "%lu.%lu", ctime.tv_sec, ctime.tv_nsec);
fmd->setAttribute("sys.eos.btime", btime);
fmd->getCTime(ctime);
char btime[256];
snprintf(btime, sizeof(btime), "%lu.%lu", ctime.tv_sec, ctime.tv_nsec);
fmd->setAttribute("sys.eos.btime", btime);
}
// if specified set an external temporary ETAG
if (ext_etag.length()) {
fmd->setAttribute("sys.tmp.etag", ext_etag);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment