mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Import: Change filename after removing old file #136
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
e1a6e5da87
commit
fcca602bfc
1 changed files with 5 additions and 1 deletions
|
|
@ -447,9 +447,13 @@ func (m *MediaFile) Move(newFilename string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := os.Remove(m.filename); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
m.filename = newFilename
|
||||
|
||||
return os.Remove(m.filename)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Copy a mediafile to another file by destinationFilename.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue