diff options
Diffstat (limited to 'toolkit/xre/nsXREDirProvider.cpp')
-rw-r--r-- | toolkit/xre/nsXREDirProvider.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index 158fe541b..151eb34e5 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -58,6 +58,9 @@ #ifdef XP_UNIX #include <ctype.h> #endif +#ifdef XP_IOS +#include "UIKitDirProvider.h" +#endif #if defined(XP_MACOSX) #define APP_REGISTRY_NAME "Application Registry" @@ -1307,6 +1310,14 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal) NS_ENSURE_SUCCESS(rv, rv); localDir = do_QueryInterface(dirFileMac, &rv); +#elif defined(XP_IOS) + nsAutoCString userDir; + if (GetUIKitDirectory(aLocal, userDir)) { + rv = NS_NewNativeLocalFile(userDir, true, getter_AddRefs(localDir)); + } else { + rv = NS_ERROR_FAILURE; + } + NS_ENSURE_SUCCESS(rv, rv); #elif defined(XP_WIN) nsString path; if (aLocal) { |