summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-06 21:12:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-06 21:12:35 (GMT)
commitd7138d6e4a693a43d929d6326607a664fcef2bc6 (patch)
tree8d01316a6369d3598559d419204f4a3a262294a1 /src/misc.c
parent4abefaf1ec4e2545b87516340c4ab21b12d7f3ff (diff)
downloadpowder-d7138d6e4a693a43d929d6326607a664fcef2bc6.zip
powder-d7138d6e4a693a43d929d6326607a664fcef2bc6.tar.gz
Make installer set data dir to current dir, for now.
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c13
1 files changed, 8 insertions, 5 deletions
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"))<MAX_PATH)
+ /*if((strlen(AppDataPath)+strlen(APPDATA_SUBDIR "\\Powder Toy"))<MAX_PATH)
{
strappend(AppDataPath, APPDATA_SUBDIR);
_mkdir(AppDataPath);
@@ -618,7 +621,7 @@ int register_extension()
} else {
returnval = 0;
goto finalise;
- }
+ }*/
sprintf(opencommand, "\"%s\" open \"%%1\" ddir \"%s\"", currentfilename, AppDataPath);
//Create extension entry