summaryrefslogtreecommitdiff
path: root/src/main_windows.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-06 21:22:48 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-06 21:22:48 +0100
commitc3a430aa1828e2c161023076cc260eeda740ae7f (patch)
treedb0c87458d0bd52055653957ba2632c43d0164dd /src/main_windows.cpp
parent81b18c444e209ef75b612c243c1fa7090411bfa0 (diff)
show red border on input when path is invalid
Diffstat (limited to 'src/main_windows.cpp')
-rw-r--r--src/main_windows.cpp10
1 files changed, 10 insertions, 0 deletions
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;