Skip to content

Commit

Permalink
Skip files that start with a dot (e.g. .DS_Store file)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchristianschroeter committed Dec 30, 2022
1 parent e8aade5 commit 087c49b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ func main() {

// Loop through the images in the source directory
for _, file := range files {
// Skip files that start with a dot (e.g. .DS_Store file)
if strings.HasPrefix(file.Name(), ".") {
continue
}

// Open the image
f, err := os.Open(sourceDirectory + file.Name())
if err != nil {
Expand Down

0 comments on commit 087c49b

Please sign in to comment.