parent
a557d62c4a
commit
a5e40563de
@ -1788,6 +1788,10 @@ func (m *Model) updateLocals(folder string, fs []protocol.FileInfo) {
|
|||||||
|
|
||||||
func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files []protocol.FileInfo, typeOfEvent events.EventType) {
|
func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files []protocol.FileInfo, typeOfEvent events.EventType) {
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
|
if file.IsInvalid() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
objType := "file"
|
objType := "file"
|
||||||
action := "modified"
|
action := "modified"
|
||||||
|
|
||||||
@ -1795,9 +1799,6 @@ func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files [
|
|||||||
case file.IsDeleted():
|
case file.IsDeleted():
|
||||||
action = "deleted"
|
action = "deleted"
|
||||||
|
|
||||||
case file.Invalid:
|
|
||||||
action = "ignored" // invalidated seems not very user friendly
|
|
||||||
|
|
||||||
// If our local vector is version 1 AND it is the only version
|
// If our local vector is version 1 AND it is the only version
|
||||||
// vector so far seen for this file then it is a new file. Else if
|
// vector so far seen for this file then it is a new file. Else if
|
||||||
// it is > 1 it's not new, and if it is 1 but another shortId
|
// it is > 1 it's not new, and if it is 1 but another shortId
|
||||||
@ -1809,7 +1810,9 @@ func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files [
|
|||||||
action = "added"
|
action = "added"
|
||||||
}
|
}
|
||||||
|
|
||||||
if file.IsDirectory() {
|
if file.IsSymlink() {
|
||||||
|
objType = "symlink"
|
||||||
|
} else if file.IsDirectory() {
|
||||||
objType = "dir"
|
objType = "dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user