MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / upOneLevel

Function upOneLevel

src/OpenLoco/src/Ui/Windows/PromptBrowseWindow.cpp:815–833  ·  view source on GitHub ↗

0x00446E2F

Source from the content-addressed store, hash-verified

813
814 // 0x00446E2F
815 static void upOneLevel()
816 {
817#ifdef _WIN32
818 // Showing drive letters?
819 if (_currentDirectory.empty())
820 {
821 return;
822 }
823
824 // The drive letter level is above file system root level.
825 if (isRootPath(_currentDirectory))
826 {
827 _currentDirectory.clear();
828 refreshDirectoryList();
829 }
830#endif
831 // Going up one level (compensating for trailing slashes).
832 changeDirectory(_currentDirectory.parent_path().parent_path());
833 }
834
835 // 0x00446E62
836 static void changeDirectory(const fs::path& newDir)

Callers 1

onMouseUpFunction · 0.85

Calls 5

isRootPathFunction · 0.85
refreshDirectoryListFunction · 0.85
changeDirectoryFunction · 0.85
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected