mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Make path separator cross-platform in few places (#628)
* make path separator cross-platform in few places * reuse path separator definer
This commit is contained in:
parent
16e5433981
commit
f06d5cb053
2 changed files with 2 additions and 2 deletions
|
@ -906,7 +906,7 @@ void ArchiveManager::start_up() {
|
||||||
td::WalkPath::run(db_root_ + "/archive/states/", [&](td::CSlice fname, td::WalkPath::Type t) -> void {
|
td::WalkPath::run(db_root_ + "/archive/states/", [&](td::CSlice fname, td::WalkPath::Type t) -> void {
|
||||||
if (t == td::WalkPath::Type::NotDir) {
|
if (t == td::WalkPath::Type::NotDir) {
|
||||||
LOG(ERROR) << "checking file " << fname;
|
LOG(ERROR) << "checking file " << fname;
|
||||||
auto pos = fname.rfind('/');
|
auto pos = fname.rfind(TD_DIR_SLASH);
|
||||||
if (pos != td::Slice::npos) {
|
if (pos != td::Slice::npos) {
|
||||||
fname.remove_prefix(pos + 1);
|
fname.remove_prefix(pos + 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ void ValidatorManagerImpl::start_up() {
|
||||||
auto S = td::WalkPath::run(to_import_dir, [&](td::CSlice cfname, td::WalkPath::Type t) -> void {
|
auto S = td::WalkPath::run(to_import_dir, [&](td::CSlice cfname, td::WalkPath::Type t) -> void {
|
||||||
auto fname = td::Slice(cfname);
|
auto fname = td::Slice(cfname);
|
||||||
if (t == td::WalkPath::Type::NotDir) {
|
if (t == td::WalkPath::Type::NotDir) {
|
||||||
auto d = fname.rfind('/');
|
auto d = fname.rfind(TD_DIR_SLASH);
|
||||||
if (d != td::Slice::npos) {
|
if (d != td::Slice::npos) {
|
||||||
fname = fname.substr(d + 1);
|
fname = fname.substr(d + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue