Fix #180
This commit is contained in:
@@ -127,8 +127,11 @@ Public Class mgrBackup
|
||||
'Verify saved game path
|
||||
sSavePath = VerifySavePath(oGame)
|
||||
|
||||
'When the backup folder is using a UNC path, skip the disk space check because we can't do it properly.
|
||||
If Not mgrPath.IsPathUNC(oSettings.BackupFolder) Then
|
||||
'Calculate space
|
||||
lAvailableSpace = mgrCommon.GetAvailableDiskSpace(oSettings.BackupFolder)
|
||||
|
||||
'If any includes are using a deep path and we aren't using recursion, we need to go directly to folders to do file size calculations or they will be missed.
|
||||
If Not oGame.RecurseSubFolders Then
|
||||
For Each s As String In oGame.IncludeArray
|
||||
@@ -154,6 +157,10 @@ Public Class mgrBackup
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'Show that disk space check was skipped
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorBackupPathIsUNC, False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
|
||||
'A manifest check is only required when "Save Multiple Backups" is disabled
|
||||
If Not oGame.AppendTimeStamp Then
|
||||
|
||||
@@ -484,6 +484,12 @@ Public Class mgrPath
|
||||
Return sValue
|
||||
End Function
|
||||
|
||||
Public Shared Function IsPathUNC(sPath As String) As Boolean
|
||||
Dim sPrefix As String = Path.DirectorySeparatorChar & Path.DirectorySeparatorChar
|
||||
If sPath.StartsWith(sPrefix) Then Return True
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function IsAbsolute(sValue As String) As Boolean
|
||||
Dim hshFolders As New Hashtable
|
||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||
|
||||
Generated
+9
@@ -6006,6 +6006,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The backup folder is a UNC path. The disk space check has been skipped..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_ErrorBackupPathIsUNC() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrBackup_ErrorBackupPathIsUNC", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
|
||||
'''</summary>
|
||||
|
||||
@@ -2335,4 +2335,7 @@
|
||||
<data name="App_ErrorLaunchExternal" xml:space="preserve">
|
||||
<value>An error occured attempting to launch the application:[BR][BR][PARAM]</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorBackupPathIsUNC" xml:space="preserve">
|
||||
<value>The backup folder is a UNC path. The disk space check has been skipped.</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user