Skip to content

Commit

Permalink
Fixed WalkInputs repeating files
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcomboom committed Feb 12, 2020
1 parent acd19cd commit 9c91d8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Apricot/Apricot.vb
Expand Up @@ -262,7 +262,6 @@ Public Module Apricot
Return output
End Function


Sub walkInputs(ByVal subdir As IO.DirectoryInfo, ByVal pattern As String, ByVal siteRoot As String, Optional ByVal worker As Object = Nothing)
Dim input = Path.Combine(siteRoot, "in\")
Dim templates = Path.Combine(siteRoot, "templates\")
Expand All @@ -272,6 +271,7 @@ Public Module Apricot
For Each file In subdir.GetFiles(pattern, SearchOption.AllDirectories)
Dim modifiedDate = file.LastWriteTime
Dim rel = ReplaceFirst(file.FullName, input, "")

While rel.StartsWith("\")
rel = ReplaceFirst(rel, "\", "")
End While
Expand All @@ -294,9 +294,9 @@ Public Module Apricot
Dim info As FileInfo = New FileInfo(Path.Combine(out, rel))
info.LastWriteTime = modifiedDate
Next
For Each sdir In subdir.GetDirectories
walkInputs(sdir, pattern, siteRoot, worker)
Next
'For Each sdir In subdir.GetDirectories
'walkInputs(sdir, pattern, siteRoot, worker)
'Next
End Sub

Public Sub buildSite(ByVal folder As String, Optional ByVal worker As Object = Nothing)
Expand Down

0 comments on commit 9c91d8f

Please sign in to comment.