update mtime on files as we write them.
This commit is contained in:
parent
53b1be748a
commit
c2c01c46f1
4
media.go
4
media.go
@ -41,6 +41,10 @@ func (m Media) Move(root string) error {
|
|||||||
return fmt.Errorf("trouble copying file: %v", err)
|
return fmt.Errorf("trouble copying file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := os.Chtimes(content, time.Now(), m.Time); err != nil {
|
||||||
|
return fmt.Errorf("couldn't chtimes for %q: %v", content, err)
|
||||||
|
}
|
||||||
|
|
||||||
year := fmt.Sprintf("%04d", m.Time.Year())
|
year := fmt.Sprintf("%04d", m.Time.Year())
|
||||||
month := fmt.Sprintf("%02d", m.Time.Month())
|
month := fmt.Sprintf("%02d", m.Time.Month())
|
||||||
ts := fmt.Sprintf("%d", m.Time.UnixNano())
|
ts := fmt.Sprintf("%d", m.Time.UnixNano())
|
||||||
|
Loading…
Reference in New Issue
Block a user