1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Upgrade description after setting filename.

Otherwise warning messages during upgrading cannot print the
filename.
This commit is contained in:
Juliusz Chroboczek 2024-05-02 00:00:37 +02:00
parent a76f225bc0
commit c2260c50db

View file

@ -441,15 +441,15 @@ func readDescription(name string, allowSubgroups bool) (*Description, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
desc.FileName = fileName
desc.fileSize = fi.Size()
desc.modTime = fi.ModTime()
err = upgradeDescription(&desc) err = upgradeDescription(&desc)
if err != nil { if err != nil {
return nil, err return nil, err
} }
desc.FileName = fileName
desc.fileSize = fi.Size()
desc.modTime = fi.ModTime()
if isSubgroup { if isSubgroup {
if !desc.AutoSubgroups { if !desc.AutoSubgroups {
return nil, os.ErrNotExist return nil, os.ErrNotExist