diff options
author | Simon Schampijer <erikos@localhost.localdomain> | 2008-07-29 08:04:05 (GMT) |
---|---|---|
committer | Simon Schampijer <erikos@localhost.localdomain> | 2008-07-29 08:04:05 (GMT) |
commit | 80820f45ae5147269565aa1e05057031ee621070 (patch) | |
tree | 9c2ec9a6d29af471585c6b58a3b4b633e387d570 /src | |
parent | 6a904c919eabdd78f6aa9ebce2107e993a5f8131 (diff) |
Setup a nsXULAppInfo service and register #7530 (tomeu)
Diffstat (limited to 'src')
-rw-r--r-- | src/HulahopDirectoryProvider.cpp | 17 | ||||
-rw-r--r-- | src/hulahop.cpp | 2 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/HulahopDirectoryProvider.cpp b/src/HulahopDirectoryProvider.cpp index fb21d69..6fc438c 100644 --- a/src/HulahopDirectoryProvider.cpp +++ b/src/HulahopDirectoryProvider.cpp @@ -51,7 +51,8 @@ HulahopDirectoryProvider::GetFile(const char *aKey, { nsresult rv; - if (!strcmp(aKey, NS_APP_USER_PROFILE_50_DIR) && mProfilePath) { + if ((!strcmp(aKey, NS_APP_USER_PROFILE_50_DIR) || + !strcmp(aKey, NS_APP_USER_PROFILE_LOCAL_50_DIR)) && mProfilePath) { NS_ADDREF(*aResult = mProfilePath); return NS_OK; } @@ -67,7 +68,19 @@ HulahopDirectoryProvider::GetFile(const char *aKey, NS_ADDREF(*aResult = file); return NS_OK; } - + + if (!strcmp(aKey, NS_XPCOM_XPTI_REGISTRY_FILE) && mProfilePath) { + nsCOMPtr<nsIFile> file; + rv = mProfilePath->Clone(getter_AddRefs(file)); + NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); + + rv = file->AppendNative(nsCString("xpti.dat")); + NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); + + NS_ADDREF(*aResult = file); + return NS_OK; + } + if (!strcmp(aKey, NS_APP_PREF_DEFAULTS_50_DIR)) { nsCOMPtr<nsILocalFile> dataDir; NS_NewNativeLocalFile(nsCString(DATA_DIR), diff --git a/src/hulahop.cpp b/src/hulahop.cpp index 8d90c6f..3e3b963 100644 --- a/src/hulahop.cpp +++ b/src/hulahop.cpp @@ -56,7 +56,7 @@ hulahop_startup() NS_ENSURE_SUCCESS(rv, FALSE); nsCOMPtr<nsILocalFile> binDir; - rv = NS_NewNativeLocalFile(nsCString(LIBXUL_DIR"/components"), PR_TRUE, + rv = NS_NewNativeLocalFile(nsCString(LIBXUL_DIR), PR_TRUE, getter_AddRefs(binDir)); NS_ENSURE_SUCCESS(rv, FALSE); |