From d7138d6e4a693a43d929d6326607a664fcef2bc6 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 6 Oct 2011 22:12:35 +0100 Subject: Make installer set data dir to current dir, for now. diff --git a/src/misc.c b/src/misc.c index 99db65e..9e5842c 100644 --- a/src/misc.c +++ b/src/misc.c @@ -594,22 +594,25 @@ int register_extension() char *currentfilename = exe_name(); char *iconname = NULL; char *opencommand = NULL; - char AppDataPath[MAX_PATH]; + //char AppDataPath[MAX_PATH]; + char *AppDataPath = NULL; iconname = malloc(strlen(currentfilename)+6); sprintf(iconname, "%s,-102", currentfilename); //Create Roaming application data folder - if(!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, AppDataPath))) + /*if(!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, AppDataPath))) { returnval = 0; goto finalise; - } + }*/ + + AppDataPath = _getcwd(NULL, 0); //Move Game executable into application data folder //TODO: Implement opencommand = malloc(strlen(currentfilename)+53+strlen(AppDataPath)); - if((strlen(AppDataPath)+strlen(APPDATA_SUBDIR "\\Powder Toy"))