| 799 | |
| 800 | |
| 801 | fs::path util::to_relative_path(const fs::path &abs) |
| 802 | { |
| 803 | auto path {fs::relative(abs)}; |
| 804 | const auto path_string {path.string()}; |
| 805 | if(path_string.starts_with("..\\") || path_string.empty()) |
| 806 | return abs; |
| 807 | else if(path_string == ".") |
| 808 | return ".\\"; |
| 809 | return ".\\" / path; |
| 810 | } |
| 811 | |
| 812 | |
| 813 | fs::path util::appdir() |