mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4528
This commit is contained in:
parent
31dc1aca3a
commit
94c9dc84a9
Binary file not shown.
|
@ -25,20 +25,54 @@
|
||||||
'' copy all the account files from the source path to the destination folder.
|
'' copy all the account files from the source path to the destination folder.
|
||||||
''
|
''
|
||||||
|
|
||||||
Dim fso
|
Function Accounts_CopyFiles()
|
||||||
Dim szInstallDir
|
|
||||||
Dim szAccountsLocation
|
|
||||||
|
|
||||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
Dim fso
|
||||||
Set szInstallDir = Session.Property("INSTALLDIR")
|
Dim szInstallDir
|
||||||
Set szAccountsLocation = Session.Property("ACCOUNTS_LOCATION")
|
Dim szAccountsLocation
|
||||||
|
Dim iReturnValue
|
||||||
|
|
||||||
|
On Error Resume Next
|
||||||
|
|
||||||
If (Not( IsEmpty(szAccountsLocation) )) Or (Not( IsNull(szAccountsLocation) )) Then
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
szInstallDir = Property("INSTALLDIR")
|
||||||
|
szAccountsLocation = Property("ACCOUNTS_LOCATION")
|
||||||
|
|
||||||
|
If (Not( IsEmpty(szAccountsLocation) )) And (Not( IsNull(szAccountsLocation) )) Then
|
||||||
|
|
||||||
'' Append the wildcard search to the end of the account file location
|
'' Append the wildcard search to the end of the account file location
|
||||||
'' string
|
'' string
|
||||||
szAccountsLocation = szAccountsLocation + "\*.xml"
|
szAccountsLocation = szAccountsLocation + "\*.xml"
|
||||||
|
|
||||||
fso.CopyFolder szAccountsLocation, szInstallDir
|
fso.CopyFile szAccountsLocation, szInstallDir
|
||||||
|
If ErrHandler("Copy Account Files Failed ") Then
|
||||||
|
iReturnValue = IDCANCEL
|
||||||
|
Else
|
||||||
|
iReturnValue = IDOK
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'' return success
|
||||||
|
Accounts_CopyFiles = iReturnValue
|
||||||
|
On Error GoTo 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function ErrHandler(what)
|
||||||
|
Dim bReturnValue
|
||||||
|
|
||||||
|
If Err.Number > 0 Then
|
||||||
|
MsgBox( what & " Error " & Err.Number & ": " & Err.Description )
|
||||||
|
Err.Clear
|
||||||
|
bReturnValue = True
|
||||||
|
Else
|
||||||
|
bReturnValue = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrHandler = bReturnValue
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Sub Print(Str)
|
||||||
|
'strip when not debugging
|
||||||
|
'MsgBox(Str)
|
||||||
|
End Sub
|
||||||
|
|
Loading…
Reference in New Issue