1 parent 492654c commit 3ee6ea0Copy full SHA for 3ee6ea0
1 file changed
lib/xy.h
@@ -800,15 +800,16 @@ _xy_os_home ()
800
*/
801
static char *
802
_xy_win_get_documents_dir() {
803
-#ifdef xy_on_windows
804
- char documents_path[MAX_PATH];
805
- HRESULT result = SHGetFolderPathA(NULL, CSIDL_MYDOCUMENTS, NULL,
806
- SHGFP_TYPE_CURRENT, documents_path);
+ if (xy_on_windows)
+ {
+ char documents_path[MAX_PATH];
+ HRESULT result = SHGetFolderPathA(NULL, CSIDL_MYDOCUMENTS, NULL,
807
+ SHGFP_TYPE_CURRENT, documents_path);
808
- if (SUCCEEDED(result)) {
809
- return xy_strdup(documents_path);
+ if (SUCCEEDED(result)) {
810
+ return xy_strdup(documents_path);
811
+ }
812
}
-#endif
813
814
return xy_2pathjoin(xy_os_home, "Documents");
815
0 commit comments