fix for strncpy with std::filesystem::path on windows

This commit is contained in:
im-tem
2025-06-30 15:00:01 +03:00
parent ca08c30b31
commit d317fe2fd8
2 changed files with 2 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ dialog_tick(Dialog* self)
std::filesystem::path baseDirectory = std::filesystem::current_path();
std::filesystem::path relativePathString = std::filesystem::relative(self->path, baseDirectory);
strncpy(relativePath, relativePathString.c_str(), PATH_MAX - 1);
strncpy(relativePath, relativePathString.string().c_str(), PATH_MAX - 1);
switch (self->type)
{

View File

@@ -57,7 +57,7 @@ init(State* state)
memset(state->startPath, '\0', PATH_MAX - 1);
strncpy(state->startPath, startPath.c_str(), PATH_MAX - 1);
strncpy(state->startPath, startPath.string().c_str(), PATH_MAX - 1);
settings_load(&state->settings);