Commit fb254f6d authored by Nikola Hardi's avatar Nikola Hardi
Browse files

Initial implementation for TJAlienSystem::AccessPathName

parent b3b73956
Pipeline #759894 failed with stage
in 3 minutes
......@@ -427,11 +427,10 @@ Bool_t TJAlienSystem::AccessPathName(const char *path, EAccessMode mode)
// The file name must not contain any special shell characters line ~ or $,
// in those cases first call ExpandPathName().
// Attention, bizarre convention of return value!!
UNUSED(path);
UNUSED(mode);
(dynamic_cast<TJAlien*> (gGrid))->NotImplemented(__func__, __FILE__, __LINE__);
return kFALSE;
/*if (!gGrid)
// (dynamic_cast<TJAlien*> (gGrid))->NotImplemented(__func__, __FILE__, __LINE__);
// return kFALSE;
if (!gGrid)
return -1;
if (strcmp(gGrid->GetGrid(), "alien")) {
......@@ -449,11 +448,18 @@ Bool_t TJAlienSystem::AccessPathName(const char *path, EAccessMode mode)
Info("AccessPathName", "Assuming an AliEn URL alien://%s",path);
url.SetProtocol("alien", kTRUE);
}
if (!gapi_access(url.GetUrl(), mode)) {
return kFALSE;
TString sPath = TString(url.GetUrl()).ReplaceAll("alien://", "");
TJAlienResult *result = (TJAlienResult*)gGrid->Command(TString("stat") + " " + sPath);
const char *val = result->GetKey(0, "__result__");
if(strcmp(val, "0") == 0) {
return false;
} else if(strcmp(val, "1") == 0) {
return true;
} else {
return kTRUE;
}*/
return true;
}
}
......
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