From: Brian S. <xue...@us...> - 2005-09-27 11:47:41
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10730 Modified Files: Tag: b0_22_2 adduser-Version.nsh adduser.nsi Log Message: Fix the bug that left the $G_SFN_DISABLED global variable undefined when the /restore option is used (this bug was likely to result in invalid data getting into POPFILE_ROOT and POPFILE_USER). Index: adduser-Version.nsh =================================================================== RCS file: /cvsroot/popfile/windows/adduser-Version.nsh,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -C2 -d -r1.6.2.4 -r1.6.2.5 *** adduser-Version.nsh 15 Sep 2005 11:57:22 -0000 1.6.2.4 --- adduser-Version.nsh 27 Sep 2005 11:47:33 -0000 1.6.2.5 *************** *** 7,11 **** #-------------------------------------------------------------------------- ! !define C_PFI_VERSION "0.2.74" #-------------------------------------------------------------------------- --- 7,11 ---- #-------------------------------------------------------------------------- ! !define C_PFI_VERSION "0.2.75" #-------------------------------------------------------------------------- Index: adduser.nsi =================================================================== RCS file: /cvsroot/popfile/windows/adduser.nsi,v retrieving revision 1.59.4.3 retrieving revision 1.59.4.4 diff -C2 -d -r1.59.4.3 -r1.59.4.4 *** adduser.nsi 15 Sep 2005 12:03:00 -0000 1.59.4.3 --- adduser.nsi 27 Sep 2005 11:47:33 -0000 1.59.4.4 *************** *** 770,776 **** ; do not support different account types, we treat this error as if user has 'Admin' rights. ! ClearErrors ! UserInfo::GetName ! IfErrors 0 got_name ; Assume Win9x system, so user has 'Admin' rights (To do: look for username in Registry?) --- 770,776 ---- ; do not support different account types, we treat this error as if user has 'Admin' rights. ! ClearErrors ! UserInfo::GetName ! IfErrors 0 got_name ; Assume Win9x system, so user has 'Admin' rights (To do: look for username in Registry?) *************** *** 782,786 **** got_name: ! Pop $G_WINUSERNAME StrCmp $G_WINUSERNAME "" 0 get_usertype StrCpy $G_WINUSERNAME "UnknownUser" --- 782,786 ---- got_name: ! Pop $G_WINUSERNAME StrCmp $G_WINUSERNAME "" 0 get_usertype StrCpy $G_WINUSERNAME "UnknownUser" *************** *** 788,792 **** get_usertype: UserInfo::GetAccountType ! Pop $G_WINUSERTYPE StrCmp $G_WINUSERTYPE "Admin" exit StrCmp $G_WINUSERTYPE "Power" exit --- 788,792 ---- get_usertype: UserInfo::GetAccountType ! Pop $G_WINUSERTYPE StrCmp $G_WINUSERTYPE "Admin" exit StrCmp $G_WINUSERTYPE "Power" exit *************** *** 2011,2014 **** --- 2011,2036 ---- check_config: + + ; Assume SFN support is enabled (the default setting for Windows) + + StrCpy $G_SFN_DISABLED "0" + + Push $G_USERDIR + Call PFI_GetSFNStatus + Pop ${L_RESULT} + StrCmp ${L_RESULT} "1" check_restore_log + StrCpy $G_SFN_DISABLED "1" + + ; Short file names are not supported here, so we cannot accept any path containing spaces. + + Push $G_USERDIR + Push ' ' + Call PFI_StrStr + Pop ${L_RESULT} + StrCmp ${L_RESULT} "" check_restore_log + Pop ${L_RESULT} + Goto SFN_problem + + check_restore_log: Pop ${L_RESULT} IfFileExists "$G_USERDIR\pfi-restore.log" 0 invalid_restore *************** *** 2021,2024 **** --- 2043,2052 ---- Abort + SFN_problem: + MessageBox MB_OK|MB_ICONSTOP "Internal Error: Unexpected space(s) found in 'restore' path !\ + ${MB_NL}${MB_NL}\ + ($G_USERDIR)" + Goto quit_wizard + invalid_restore: MessageBox MB_OK|MB_ICONSTOP "Error: No 'restore' data found at specified location !\ |