Changeset 3291
- Timestamp:
- 04/02/07 09:58:47 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossie/branches/philip-work/framework/FileSystem_impl.cpp
r3288 r3291 150 150 DEBUG(9, FileSystem, "In list checking file " << itr->leaf()); 151 151 152 if (fnmatch(searchPattern.c_str(), itr->leaf().c_str(), 0) ) {152 if (fnmatch(searchPattern.c_str(), itr->leaf().c_str(), 0) == 0) { 153 153 DEBUG(9, FileSystem, "Match in list with " << itr->leaf()); 154 154 155 155 result->length(idx + 1); 156 fs::path foundPath(filePath.branch_path() / itr->leaf()); 157 result[idx].name = CORBA::string_dup(foundPath.string().c_str()); 158 if (fs::is_directory(*itr)) 156 if (fs::is_directory(*itr)) { 157 std::string tmp(itr->leaf()); 158 tmp += "/"; 159 result[idx].name = CORBA::string_dup(tmp.c_str()); 159 160 result[idx].kind = CF::FileSystem::DIRECTORY; 160 else 161 result[idx].size = 0; 162 } else { 163 result[idx].name = CORBA::string_dup(itr->leaf().c_str()); 161 164 result[idx].kind = CF::FileSystem::PLAIN; 162 163 result[idx].size = fs::file_size(*itr); 165 result[idx].size = fs::file_size(*itr); 166 } 167 164 168 165 169 /// \todo fix file creation time and last access time