Skip to content

Commit

Permalink
buckfix deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jxsl13 committed Jul 15, 2024
1 parent 35d6763 commit 983dbdf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backupfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@ func (fsys *BackupFS) UnmarshalJSON(data []byte) error {

fsys.baseInfos = make(map[string]fs.FileInfo, len(fiMap))
for k, v := range fiMap {
if v == nil {
// required, otherwise the value cannot be checked whethe rit's nil or not
// due to the additional type information of k, which is of type *fInfo
fsys.baseInfos[k] = nil
continue
}
fsys.baseInfos[k] = v
}

Expand Down

0 comments on commit 983dbdf

Please sign in to comment.