- Timestamp:
- 08/17/08 10:00:33 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ConfigOptions.cpp
r495 r552 41 41 hal::xp::wsmatch what; 42 42 43 if(hal::xp::regex_match(dir_itr->path(). leaf(), what, rex))43 if(hal::xp::regex_match(dir_itr->path().filename(), what, rex)) 44 44 { 45 45 HMODULE hMod = ::LoadLibraryEx(dir_itr->path().string().c_str(), 0, LOAD_LIBRARY_AS_DATAFILE); … … 53 53 { 54 54 wstring lang_name(buffer.elems); 55 lang_map_[lang_name] = dir_itr->path(). leaf();55 lang_map_[lang_name] = dir_itr->path().filename(); 56 56 int index = lang_list_.AddString(lang_name.c_str()); 57 57 58 if (dir_itr->path(). leaf() == halite().dll_)58 if (dir_itr->path().filename() == halite().dll_) 59 59 lang_list_.SetCurSel(index); 60 60 } -
trunk/src/Halite.cpp
r539 r552 37 37 void operator()(shared_ptr<hal::EventDetail> event) 38 38 { 39 if ( true ||halite().logToFile())39 if (halite().logToFile()) 40 40 { 41 41 if (!wofs.is_open()) wofs.open(hal::app().working_directory()/L"HaliteLog.txt"); -
trunk/src/NewTorrentDialog.cpp
r531 r552 103 103 { 104 104 for (hal::fs::wdirectory_iterator i(currentDir), end; i != end; ++i) 105 recurseDirectory(files, baseDir, relDir / i-> leaf());105 recurseDirectory(files, baseDir, relDir / i->filename()); 106 106 } 107 107 else 108 108 { 109 files.push_back(baseDir. leaf()/relDir);109 files.push_back(baseDir.filename()/relDir); 110 110 } 111 111 } … … 120 120 wpath file = wpath(dlgOpen.m_ofn.lpstrFile); 121 121 122 fileRoot_ = file. branch_path();123 files_.push_back(file. leaf());122 fileRoot_ = file.parent_path(); 123 files_.push_back(file.filename()); 124 124 125 125 UpdateFileList(); 126 SetDlgItemText(HAL_NEWT_FILE_NAME_EDIT, file. leaf().c_str());126 SetDlgItemText(HAL_NEWT_FILE_NAME_EDIT, file.filename().c_str()); 127 127 } 128 128 … … 146 146 files_.clear(); 147 147 148 fileRoot_ = wpath(fldDlg.m_szFolderPath). branch_path();148 fileRoot_ = wpath(fldDlg.m_szFolderPath).parent_path(); 149 149 recurseDirectory(files_, wpath(fldDlg.m_szFolderPath), L""); 150 150 151 151 UpdateFileList(); 152 SetDlgItemText(HAL_NEWT_FILE_NAME_EDIT, fileRoot_. leaf().c_str());152 SetDlgItemText(HAL_NEWT_FILE_NAME_EDIT, fileRoot_.filename().c_str()); 153 153 } 154 154 … … 167 167 foreach(wpath& file, files_) 168 168 { 169 int itemPos = filesList_.AddItem(0, 0, file. leaf().c_str(), 0);170 171 filesList_.SetItemText(itemPos, 1, file. branch_path().file_string().c_str());169 int itemPos = filesList_.AddItem(0, 0, file.filename().c_str(), 0); 170 171 filesList_.SetItemText(itemPos, 1, file.parent_path().file_string().c_str()); 172 172 filesList_.SetItemText(itemPos, 2, lexical_cast<wstring>( 173 173 hal::fs::file_size(fileRoot_/file)).c_str()); -
trunk/src/advtabs/Files.hpp
r531 r552 324 324 { 325 325 (*i).second.valid = true; 326 EnsureValid(branchPath. branch_path());326 EnsureValid(branchPath.parent_path()); 327 327 } 328 328 } -
trunk/src/global/txml_iarchive.hpp
r549 r552 212 212 213 213 if (previous_child_node_ && 214 previous_child_branch_ == location. branch_path())214 previous_child_branch_ == location.parent_path()) 215 215 { 216 216 // TXML_LOG(boost::wformat(L" << previous_child: %1%") % previous_child_node_->to_element()->get_text()); 217 failsafe_current = previous_child_node_->next_sibling(location. leaf());217 failsafe_current = previous_child_node_->next_sibling(location.filename()); 218 218 previous_child_node_ = 0; 219 219 220 220 if (!failsafe_current) 221 failsafe_current = current_node_->first_child(location. leaf());;221 failsafe_current = current_node_->first_child(location.filename());; 222 222 } 223 223 else … … 250 250 current_node_ = failsafe_current; 251 251 252 previous_child_branch_ = location. branch_path();252 previous_child_branch_ = location.parent_path(); 253 253 } 254 254 } -
trunk/src/global/txml_oarchive.hpp
r539 r552 193 193 boost::filesystem::path branch(name); 194 194 195 std::string leaf = branch. leaf();196 branch = branch. branch_path();195 std::string leaf = branch.filename(); 196 branch = branch.parent_path(); 197 197 198 198 foreach(std::string elem, branch) -
trunk/src/global/wtl_app.cpp
r492 r552 67 67 command_args_.push_back(szArglist[i]); 68 68 69 working_directory_ = exe_path_. branch_path();69 working_directory_ = exe_path_.parent_path(); 70 70 } 71 71 LocalFree(szArglist); -
trunk/src/halConfig.hpp
r542 r552 40 40 enableProxy(false), 41 41 proxyPort(0), 42 default_save_folder_((hal::app().exe_path(). branch_path()/L"incoming").string()),43 default_move_folder_((hal::app().exe_path(). branch_path()/L"completed").string()),42 default_save_folder_((hal::app().exe_path().parent_path()/L"incoming").string()), 43 default_move_folder_((hal::app().exe_path().parent_path()/L"completed").string()), 44 44 use_move_to_(false), 45 45 save_prompt_(true), -
trunk/src/halEvent.cpp
r539 r552 80 80 { 81 81 mutex_t::scoped_lock l(pimpl_->mutex_); 82 if (e->level() != hal::event_logger::debug || halite().logDebug() || true)82 if (e->level() != hal::event_logger::debug || halite().logDebug()) 83 83 pimpl_->event_signal_(e); 84 84 } -
trunk/src/halSession.hpp
r548 r552 638 638 wstring xml_name = from_utf8(names.first) + L".xml"; 639 639 640 if (false && fs::exists(file. branch_path()/xml_name))640 if (false && fs::exists(file.parent_path()/xml_name)) 641 641 { 642 642 torrent_standalone tsa; 643 643 644 if (tsa.load_standalone(file. branch_path()/xml_name))644 if (tsa.load_standalone(file.parent_path()/xml_name)) 645 645 { 646 646 TIp = tsa.torrent; … … 697 697 698 698 wpath torrentFilename = torrentName; 699 const wpath resumeFile = workingDirectory/L"resume"/torrentFilename. leaf();699 const wpath resumeFile = workingDirectory/L"resume"/torrentFilename.filename(); 700 700 701 701 // vvv Handle old naming style! 702 const wpath oldResumeFile = workingDirectory/L"resume"/filename. leaf();703 704 if (filename. leaf() != torrentFilename.leaf() && exists(oldResumeFile))702 const wpath oldResumeFile = workingDirectory/L"resume"/filename.filename(); 703 704 if (filename.filename() != torrentFilename.filename() && exists(oldResumeFile)) 705 705 fs::rename(oldResumeFile, resumeFile); 706 706 // ^^^ Handle old naming style! … … 726 726 fs::create_directory(workingDirectory/L"torrents"); 727 727 728 if (!fs::exists(workingDirectory/L"torrents"/torrentFilename. leaf()))729 fs::copy_file(filename.string(), workingDirectory/L"torrents"/torrentFilename. leaf());728 if (!fs::exists(workingDirectory/L"torrents"/torrentFilename.filename())) 729 fs::copy_file(filename.string(), workingDirectory/L"torrents"/torrentFilename.filename()); 730 730 731 731 if (!fs::exists(saveDirectory)) … … 761 761 { 762 762 std::string p = (hal::path_to_utf8(pIT->saveDirectory()) / i->path).string(); 763 fs::path bp = i->path. branch_path();763 fs::path bp = i->path.parent_path(); 764 764 765 765 std::pair<std::set<std::string>::iterator, bool> ret; … … 769 769 std::pair<std::set<std::string>::iterator, bool> ret = 770 770 directories.insert((hal::path_to_utf8(pIT->saveDirectory()) / bp).string()); 771 bp = bp. branch_path();771 bp = bp.parent_path(); 772 772 } 773 773 if (!fs::remove(hal::from_utf8(p).c_str()) && errno != ENOENT) -
trunk/src/halTorrent.hpp
r542 r552 266 266 { 267 267 FileDetail(boost::filesystem::wpath p, boost::int64_t s=0, float pg=0, int pr=1, size_t o=0, unsigned t=FileDetail::file) : 268 branch(p. branch_path()),269 filename(p. leaf()),268 branch(p.parent_path()), 269 filename(p.filename()), 270 270 type(t), 271 271 size(s),
Note: See TracChangeset
for help on using the changeset viewer.