FilepathNormalize(ntServerInstallDirShort);
/* get the afs client configuration directory (/usr/vice/etc equivalent) */
- status = GetWindowsDirectory(ntClientConfigDirLong, AFSDIR_PATH_MAX);
- if (status == 0 || status > AFSDIR_PATH_MAX) {
- /* failed to get canonical Windows directory; use temp directory */
- strcpy(ntClientConfigDirLong, gettmpdir());
+ if (afssw_GetClientInstallDir(&buf)) {
+ /* failed */
+ status = GetWindowsDirectory(ntClientConfigDirLong, AFSDIR_PATH_MAX);
+ if (status == 0 || status > AFSDIR_PATH_MAX) {
+ /* failed to get canonical Windows directory; use temp directory */
+ strcpy(ntClientConfigDirLong, gettmpdir());
+ } else {
+ initStatus |= AFSDIR_CLIENT_PATHS_OK;
+ }
} else {
- initStatus |= AFSDIR_CLIENT_PATHS_OK;
+ strcpy(ntClientConfigDirLong, buf);
+ free(buf);
+ initStatus |= AFSDIR_CLIENT_PATHS_OK;
}
FilepathNormalize(ntClientConfigDirLong);
/* now initialize various dir and file paths exported by dirpath module */
/* server dir paths */
-
strcpy(dirPathArray[AFSDIR_SERVER_AFS_DIRPATH_ID], afsSrvDirPath);
pathp = dirPathArray[AFSDIR_SERVER_ETC_DIRPATH_ID];
AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_BIN_FILE_DIR);
/* client dir path */
-
#ifdef AFS_NT40_ENV
strcpy(dirPathArray[AFSDIR_CLIENT_VICE_DIRPATH_ID],
"/NoUsrViceDirectoryOnWindows");
#endif /* AFS_NT40_ENV */
/* server file paths */
-
pathp = dirPathArray[AFSDIR_SERVER_THISCELL_FILEPATH_ID];
AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_SERVER_ETC_DIR,
AFSDIR_THISCELL_FILE);
/* client file paths */
-
#ifdef AFS_NT40_ENV
strcpy(dirPathArray[AFSDIR_CLIENT_THISCELL_FILEPATH_ID],
"/NoUsrViceEtcThisCellFileOnWindows");