Changeset 3552

Show
Ignore:
Timestamp:
10/20/2009 03:06:31 PM (1 month ago)
Author:
brian
Message:

Fixes for the directory listing to make recursive xrdcp.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • XrdHdfs/XrdHdfs.cc

    r3551 r3552  
    6262} 
    6363 
     64using namespace std; 
    6465using namespace XrdHdfs; 
    6566 
     
    148149  if (!dh)  { 
    149150     XrdHdfsSys::Emsg(epname,error,EBADF,"read directory",fname); 
     151     return -EBADF; 
     152  } 
     153 
     154// Check if we are at EOF (once there we stay there) 
     155// 
     156   if (dirPos == numEntries-1) { 
     157     *buff = '\0'; 
    150158     return 0; 
    151   } 
    152  
    153 // Check if we are at EOF (once there we stay there) 
    154 // 
    155    if (dirPos == numEntries-1) 
    156      return 0; 
     159   } 
    157160 
    158161// Read the next directory entry 
     
    163166// Return the actual entry 
    164167// 
    165    strlcpy(buff, (const char *)(fileInfo.mName), blen); 
     168   std::string full_name = fileInfo.mName; 
     169   full_name.erase(0, full_name.rfind("/")); 
     170   strlcpy(buff, full_name.c_str(), blen); 
    166171   return XrdOssOK; 
    167172} 
  • XrdHdfs/XrdHdfs.hh

    r3537 r3552  
    4848                                 numEntries = 0; 
    4949                                 dirPos = 0; 
     50                                 isopen = 0; 
    5051                                } 
    5152