Skip to content

Commit

Permalink
client/screenshot: avoid realpath() on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
LizzyFleckenstein03 committed Aug 23, 2024
1 parent 7da4e9b commit e67a95d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/screenshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ char *screenshot()
glDeleteTextures(2, txos); GL_DEBUG
glDeleteFramebuffers(2, fbos); GL_DEBUG

#ifdef _WIN32
char *display_path = path;
#else
char display_path[PATH_MAX];
realpath(path, display_path);

Expand All @@ -86,6 +89,7 @@ char *screenshot()
display_path[len_home-1] = '~';
return strdup(display_path+len_home-1);
}
#endif

return strdup(display_path);
}

0 comments on commit e67a95d

Please sign in to comment.