Changeset 800 for trunk/libtorrent/src/data/entry_list.cc
- Timestamp:
- 11/04/06 11:05:28 (6 years ago)
- Files:
-
- 1 modified
-
trunk/libtorrent/src/data/entry_list.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtorrent/src/data/entry_list.cc
r777 r800 98 98 99 99 try { 100 if (::mkdir(m_rootDir.c_str(), 0777) && errno != EEXIST)100 if (::mkdir(m_rootDir.c_str(), 0777) != 0 && errno != EEXIST) 101 101 throw storage_error("Could not create directory '" + m_rootDir + "': " + strerror(errno)); 102 102 … … 205 205 break; 206 206 207 if (::mkdir(path.c_str(), 0777) && errno != EEXIST)207 if (::mkdir(path.c_str(), 0777) != 0 && errno != EEXIST) 208 208 throw storage_error("Could not create directory '" + path + "': " + strerror(errno)); 209 209 } … … 223 223 } 224 224 225 rak::error_number::clear_global(); 226 225 227 make_directory(path->begin(), path->end(), firstMismatch); 226 228 … … 229 231 if (path->back().empty()) 230 232 return node->size() == 0; 233 234 rak::file_stat fileStat; 235 236 if (fileStat.update(node->file_meta()->get_path()) && 237 !fileStat.is_regular() && !fileStat.is_link()) { 238 // Might also bork on other kinds of file types, but there's no 239 // suitable errno for all cases. 240 rak::error_number::set_global(rak::error_number::e_isdir); 241 return false; 242 } 231 243 232 244 return
