mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 11:44:45 -06:00
- Reverted changes to exclude mechanism of .duplicacy directory.
This commit is contained in:
@@ -481,6 +481,9 @@ func ListEntries(top string, path string, fileList *[]*Entry, patterns []string,
|
|||||||
entries := make([]*Entry, 0, 4)
|
entries := make([]*Entry, 0, 4)
|
||||||
|
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
|
if f.Name() == DUPLICACY_DIRECTORY {
|
||||||
|
continue
|
||||||
|
}
|
||||||
entry := CreateEntryFromFileInfo(f, normalizedPath)
|
entry := CreateEntryFromFileInfo(f, normalizedPath)
|
||||||
if len(patterns) > 0 && !MatchPath(entry.Path, patterns) {
|
if len(patterns) > 0 && !MatchPath(entry.Path, patterns) {
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -123,17 +122,7 @@ func AppendPattern(patterns []string, new_pattern string) (new_patterns []string
|
|||||||
return new_patterns
|
return new_patterns
|
||||||
}
|
}
|
||||||
func ProcessFilters() (patterns []string) {
|
func ProcessFilters() (patterns []string) {
|
||||||
patternFileLines := []string{
|
patterns = ProcessFilterFile(joinPath(GetDuplicacyPreferencePath(), "filters"), make([]string, 0))
|
||||||
`# ============================ exclude the internal files and directories in all ".duplicacy" subfolders`,
|
|
||||||
`e:(?i)(^|/)` + regexp.QuoteMeta(DUPLICACY_DIRECTORY) + `/cache/`,
|
|
||||||
`e:(?i)(^|/)` + regexp.QuoteMeta(DUPLICACY_DIRECTORY) + `/temporary$`,
|
|
||||||
`# ============================ exclude the internal files and directories in toplevel ".duplicacy" subfolder`,
|
|
||||||
`e:(?i)^` + regexp.QuoteMeta(DUPLICACY_DIRECTORY) + `/incomplete$`,
|
|
||||||
`e:(?i)^` + regexp.QuoteMeta(DUPLICACY_DIRECTORY) + `/logs/`,
|
|
||||||
"@" + joinPath(GetDuplicacyPreferencePath(), "filters"),
|
|
||||||
}
|
|
||||||
LOG_DEBUG("SNAPSHOT_FILTER", "Adding standard filters ...")
|
|
||||||
patterns = ProcessFilterLines(patternFileLines, make([]string, 0))
|
|
||||||
|
|
||||||
LOG_DEBUG("REGEX_DEBUG", "There are %d compiled regular expressions stored", len(RegexMap))
|
LOG_DEBUG("REGEX_DEBUG", "There are %d compiled regular expressions stored", len(RegexMap))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user