Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
JAliEn
JAliEn-ROOT
Commits
fb254f6d
Commit
fb254f6d
authored
Nov 09, 2018
by
Nikola Hardi
Browse files
Initial implementation for TJAlienSystem::AccessPathName
parent
b3b73956
Pipeline
#759894
failed with stage
in 3 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
TJAlienSystem.cxx
View file @
fb254f6d
...
...
@@ -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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment