| 478 | } |
| 479 | |
| 480 | extern MMKVPath_t absolutePath(const MMKVPath_t &path) { |
| 481 | fs::path relative_path(path); |
| 482 | fs::path absolute_path = fs::absolute(relative_path); |
| 483 | try { |
| 484 | fs::path normalized = fs::weakly_canonical(absolute_path); |
| 485 | return normalized.string(); |
| 486 | } catch (std::exception &e) { |
| 487 | MMKVError("fail to weakly_canonical() path %s, error: %s", absolute_path.c_str(), e.what()); |
| 488 | } |
| 489 | return absolute_path.string(); |
| 490 | } |
| 491 | |
| 492 | #ifndef MMKV_APPLE |
| 493 |
no outgoing calls
no test coverage detected