3333#include " fst/Deletion.hh"
3434#include " fst/Verify.hh"
3535#include " fst/utils/XrdOfsPathHandler.hh"
36+ #ifdef HAVE_NFS
37+ #include " fst/io/nfs/NfsIo.hh"
38+ #endif
3639#include " common/Utils.hh"
3740#include " common/PasswordHandler.hh"
3841#include " common/FileId.hh"
@@ -659,8 +662,9 @@ XrdFstOfs::Configure(XrdSysError& Eroute, XrdOucEnv* envP)
659662 " an absolute path like /etc/grid-security/jwt-token-grpc" );
660663 NoGo = 1 ;
661664 } else {
662- gConfig .JwtTokenPath = val;
665+ gConfig .JwtTokenPath = val;
663666 }
667+
664668 Eroute.Say (" =====> fstofs.jwttokenpath : " , val);
665669 }
666670
@@ -1768,7 +1772,7 @@ XrdFstOfs::FSctl(const int cmd, XrdSfsFSctl& args, XrdOucErrInfo& error,
17681772 // Check that new path doesn't exist already
17691773 struct stat info;
17701774
1771- if (:: stat (new_path.c_str (), & info) == 0 ) {
1775+ if (FileIo::fsStat (new_path.c_str (), info) == 0 ) {
17721776 eos_static_err (" msg=\" new path already exists on filesystem\" "
17731777 " fsid=%08llx new_path=%s" , fsid, new_path.c_str ());
17741778 return gOFS .Emsg (epname, error, EEXIST, " do local rename" , " " );
@@ -1789,12 +1793,12 @@ XrdFstOfs::FSctl(const int cmd, XrdSfsFSctl& args, XrdOucErrInfo& error,
17891793 return gOFS .Emsg (epname, error, EEXIST, " do local rename" , " " );
17901794 }
17911795
1792- if (:: rename (old_path. c_str () , new_path. c_str ()) ) {
1796+ if (FileIo::fsRename (old_path, new_path) != 0 ) {
17931797 eos_static_err (" msg=\" rename failed\" old_path=%s new_path=%s errno=%d" ,
17941798 old_path.c_str (), new_path.c_str (), errno);
17951799 return gOFS .Emsg (epname, error, EEXIST, " do local rename" , " " );
17961800 } else {
1797- // Update the filemd info to point to the origianl file identifier
1801+ // Update the filemd info to point to the original fille identifier
17981802 if (!mFmdHandler ->UpdateFmd (new_path, new_fid)) {
17991803 eos_static_err (" msg=\" failed to update fid for the fmd object\" "
18001804 " path=%s new_fid=%08llx" , new_path.c_str (), new_fid);
@@ -2075,10 +2079,15 @@ XrdFstOfs::UpdateTpcKeyValidity()
20752079// Create directory hierarchy
20762080// ------------------------------------------------------------------------------
20772081bool
2078- XrdFstOfs::CreateDirHierarchy (const std::string& dir_hierarchy,
2082+ XrdFstOfs::CreateDirHierarchy (std::string dir_hierarchy,
20792083 mode_t mode) const
20802084{
20812085 struct stat info;
2086+
2087+ if (dir_hierarchy.find (" nfs:/" ) == 0 ) {
2088+ dir_hierarchy.erase (0 , 5 );
2089+ }
2090+
20822091 std::string path = " /" ;
20832092 auto lst_dirs = eos::common::StringTokenizer::split<std::list<std::string>>
20842093 (dir_hierarchy, ' /' );
0 commit comments