comparison cinst/nssstore_win.c @ 826:4aa33c408776

Remove TODO windows gracefully handles the case where the data directory is not accessible.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 21 Jul 2014 18:53:13 +0200
parents 24e1e47e2d1a
children 216a65d7fc4b
comparison
equal deleted inserted replaced
825:24e1e47e2d1a 826:4aa33c408776
908 908
909 /**@brief Writes the selection file containing the instructions 909 /**@brief Writes the selection file containing the instructions
910 * 910 *
911 * If the process is running elevated the instructions are 911 * If the process is running elevated the instructions are
912 * written to the global ProgramData directory otherwise 912 * written to the global ProgramData directory otherwise
913 * they are written in the temporary directory of the current user. 913 * they are written in the directory of the current user.
914 * 914 *
915 * If the return value is not NULL it needs to be freed by the caller. 915 * If the return value is not NULL it needs to be freed by the caller.
916 * The returned path will contain backslashes as directory seperators. 916 * The returned path will contain backslashes as directory seperators.
917 * 917 *
918 * @param[in] to_install Certificates that should be installed 918 * @param[in] to_install Certificates that should be installed
922 wchar_t * 922 wchar_t *
923 write_selection_file (char **to_install, char **to_remove) 923 write_selection_file (char **to_install, char **to_remove)
924 { 924 {
925 wchar_t *folder_name = NULL, 925 wchar_t *folder_name = NULL,
926 *path = NULL; 926 *path = NULL;
927 bool elevated = is_elevated();
928 HRESULT result = E_FAIL; 927 HRESULT result = E_FAIL;
929 HANDLE hFile = NULL; 928 HANDLE hFile = NULL;
930 size_t path_len; 929 size_t path_len;
931
932 if (!elevated)
933 {
934 /* TODO */
935 }
936 930
937 result = SHGetKnownFolderPath (&FOLDERID_ProgramData, /* Get program data dir */ 931 result = SHGetKnownFolderPath (&FOLDERID_ProgramData, /* Get program data dir */
938 KF_FLAG_CREATE | /* Create if it does not exist */ 932 KF_FLAG_CREATE | /* Create if it does not exist */
939 KF_FLAG_INIT, /* Initialize it if created */ 933 KF_FLAG_INIT, /* Initialize it if created */
940 INVALID_HANDLE_VALUE, /* Get it for the default user */ 934 INVALID_HANDLE_VALUE, /* Get it for the default user */

http://wald.intevation.org/projects/trustbridge/