Changeset 3552
- Timestamp:
- 10/20/2009 03:06:31 PM (1 month ago)
- Files:
-
- XrdHdfs/XrdHdfs.cc (modified) (3 diffs)
- XrdHdfs/XrdHdfs.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
XrdHdfs/XrdHdfs.cc
r3551 r3552 62 62 } 63 63 64 using namespace std; 64 65 using namespace XrdHdfs; 65 66 … … 148 149 if (!dh) { 149 150 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'; 150 158 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 } 157 160 158 161 // Read the next directory entry … … 163 166 // Return the actual entry 164 167 // 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); 166 171 return XrdOssOK; 167 172 } XrdHdfs/XrdHdfs.hh
r3537 r3552 48 48 numEntries = 0; 49 49 dirPos = 0; 50 isopen = 0; 50 51 } 51 52
