Skip to content

Commit

Permalink
[Quickstart] Fix adding includes to a folder that already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcomboom committed May 4, 2020
1 parent 5f58662 commit 1037dca
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions AutoSite/Quickstart.vb
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@
MsgBox("AutoSite was not able to create the given subdirectory for some reason." & vbNewLine & vbNewLine & ex.ToString, MsgBoxStyle.Critical, "Unable to copy files")
Exit Sub
End Try
Dim dir = ""
If My.Computer.FileSystem.DirectoryExists(path) Then
dir = path
ElseIf My.Computer.FileSystem.FileExists(path) Then
dir = My.Computer.FileSystem.GetFileInfo(path).DirectoryName
End If
If My.Computer.FileSystem.DirectoryExists(dir) Then
Main.AddFilesDialog.Title = "Add Files to " & dir
If Main.AddFilesDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
For Each file In Main.AddFilesDialog.FileNames
Try
My.Computer.FileSystem.CopyFile(file, System.IO.Path.Combine(dir, System.IO.Path.GetFileName(file)))
Catch ex As Exception
MsgBox(ex.Message)
End Try
Next
'refreshTree(siteTree.Nodes(0))
End If
End If
Dim dir = ""
If My.Computer.FileSystem.DirectoryExists(path) Then
dir = path
ElseIf My.Computer.FileSystem.FileExists(path) Then
dir = My.Computer.FileSystem.GetFileInfo(path).DirectoryName
End If
If My.Computer.FileSystem.DirectoryExists(dir) Then
Main.AddFilesDialog.Title = "Add Files to " & dir
If Main.AddFilesDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
For Each file In Main.AddFilesDialog.FileNames
Try
My.Computer.FileSystem.CopyFile(file, System.IO.Path.Combine(dir, System.IO.Path.GetFileName(file)))
Catch ex As Exception
MsgBox(ex.Message)
End Try
Next
'refreshTree(siteTree.Nodes(0))
End If
End If

Expand Down

0 comments on commit 1037dca

Please sign in to comment.