From c3a430aa1828e2c161023076cc260eeda740ae7f Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Wed, 6 Mar 2024 21:22:48 +0100 Subject: show red border on input when path is invalid --- src/main_windows.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main_windows.cpp') diff --git a/src/main_windows.cpp b/src/main_windows.cpp index c574b2f..7c6fba2 100644 --- a/src/main_windows.cpp +++ b/src/main_windows.cpp @@ -52,6 +52,16 @@ static const char* _ts_platform_get_config_file_path(char* buffer) { return 0; } +bool ts_platform_dir_exists(utf8_int8_t* dir) +{ + DWORD ftyp = GetFileAttributesA(dir); + if (ftyp == INVALID_FILE_ATTRIBUTES) + return false; + if (ftyp & FILE_ATTRIBUTE_DIRECTORY) + return true; + return false; +} + uint64_t ts_platform_get_time(uint64_t compare) { LARGE_INTEGER stamp; -- cgit v1.2.3-70-g09d2