File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
urlwatcher/Sources/urlwatcher Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,17 @@ for i in 0..<config.count {
9393 // Crop the screenshot
9494 try cropScreenshot ( path: latestImage, area: entry. area)
9595
96- // If there is no previous screenshot, we cannot compare anything
97- guard fileManager. fileExists ( atPath: oldImage ) else {
96+ let addedPath = " \( entryPath ) /.added "
97+ guard fileManager. fileExists ( atPath: addedPath ) else {
9898 // This is a new entry
9999 try notifyNew ( entry: entry, file: latestImage)
100+ fileManager. createFile ( atPath: addedPath, contents: nil )
101+ // Skip comparison
102+ return false
103+ }
104+
105+ // If there is no previous screenshot, we cannot compare anything
106+ guard fileManager. fileExists ( atPath: oldImage) else {
100107 // Skip comparison
101108 return false
102109 }
You can’t perform that action at this time.
0 commit comments