mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
ItemStarted can be map[string]string
This commit is contained in:
parent
d728320ece
commit
c1f4477376
@ -528,7 +528,7 @@ nextFile:
|
|||||||
// handleDir creates or updates the given directory
|
// handleDir creates or updates the given directory
|
||||||
func (p *rwFolder) handleDir(file protocol.FileInfo) {
|
func (p *rwFolder) handleDir(file protocol.FileInfo) {
|
||||||
var err error
|
var err error
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": file.Name,
|
"item": file.Name,
|
||||||
"type": "dir",
|
"type": "dir",
|
||||||
@ -611,7 +611,7 @@ func (p *rwFolder) handleDir(file protocol.FileInfo) {
|
|||||||
// deleteDir attempts to delete the given directory
|
// deleteDir attempts to delete the given directory
|
||||||
func (p *rwFolder) deleteDir(file protocol.FileInfo) {
|
func (p *rwFolder) deleteDir(file protocol.FileInfo) {
|
||||||
var err error
|
var err error
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": file.Name,
|
"item": file.Name,
|
||||||
"type": "dir",
|
"type": "dir",
|
||||||
@ -657,7 +657,7 @@ func (p *rwFolder) deleteDir(file protocol.FileInfo) {
|
|||||||
// deleteFile attempts to delete the given file
|
// deleteFile attempts to delete the given file
|
||||||
func (p *rwFolder) deleteFile(file protocol.FileInfo) {
|
func (p *rwFolder) deleteFile(file protocol.FileInfo) {
|
||||||
var err error
|
var err error
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": file.Name,
|
"item": file.Name,
|
||||||
"type": "file",
|
"type": "file",
|
||||||
@ -706,13 +706,13 @@ func (p *rwFolder) deleteFile(file protocol.FileInfo) {
|
|||||||
// and set the right attributes on it.
|
// and set the right attributes on it.
|
||||||
func (p *rwFolder) renameFile(source, target protocol.FileInfo) {
|
func (p *rwFolder) renameFile(source, target protocol.FileInfo) {
|
||||||
var err error
|
var err error
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": source.Name,
|
"item": source.Name,
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"action": "delete",
|
"action": "delete",
|
||||||
})
|
})
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": target.Name,
|
"item": target.Name,
|
||||||
"type": "file",
|
"type": "file",
|
||||||
@ -825,7 +825,7 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks
|
|||||||
l.Debugln(p, "taking shortcut on", file.Name)
|
l.Debugln(p, "taking shortcut on", file.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": file.Name,
|
"item": file.Name,
|
||||||
"type": "file",
|
"type": "file",
|
||||||
@ -851,7 +851,7 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
events.Default.Log(events.ItemStarted, map[string]interface{}{
|
events.Default.Log(events.ItemStarted, map[string]string{
|
||||||
"folder": p.folder,
|
"folder": p.folder,
|
||||||
"item": file.Name,
|
"item": file.Name,
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
Loading…
Reference in New Issue
Block a user