mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 06:30:07 +08:00
fix
This commit is contained in:
parent
7e1aad0b54
commit
1d56ea24ef
@ -36,21 +36,21 @@ func NewUidGidMapper(uidPairsStr, gidPairStr string) (*UidGidMapper, error) {
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UidGidMapper) LocalToFiler(uid, gid uint32) (uint32,uint32) {
|
func (m *UidGidMapper) LocalToFiler(uid, gid uint32) (uint32, uint32) {
|
||||||
return m.uidMapper.LocalToFiler(uid), m.gidMapper.LocalToFiler(gid)
|
return m.uidMapper.LocalToFiler(uid), m.gidMapper.LocalToFiler(gid)
|
||||||
}
|
}
|
||||||
func (m *UidGidMapper) FilerToLocal(uid, gid uint32) (uint32,uint32) {
|
func (m *UidGidMapper) FilerToLocal(uid, gid uint32) (uint32, uint32) {
|
||||||
return m.uidMapper.FilerToLocal(uid), m.gidMapper.FilerToLocal(gid)
|
return m.uidMapper.FilerToLocal(uid), m.gidMapper.FilerToLocal(gid)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *IdMapper) LocalToFiler(id uint32) (uint32) {
|
func (m *IdMapper) LocalToFiler(id uint32) uint32 {
|
||||||
value, found := m.localToFiler[id]
|
value, found := m.localToFiler[id]
|
||||||
if found {
|
if found {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
return id
|
return id
|
||||||
}
|
}
|
||||||
func (m *IdMapper) FilerToLocal(id uint32) (uint32) {
|
func (m *IdMapper) FilerToLocal(id uint32) uint32 {
|
||||||
value, found := m.filerToLocal[id]
|
value, found := m.filerToLocal[id]
|
||||||
if found {
|
if found {
|
||||||
return value
|
return value
|
||||||
@ -85,7 +85,7 @@ func parseUint32Pairs(pairsStr string) (localToFiler, filerToLocal map[uint32]ui
|
|||||||
localUidStr, filerUidStr := pair[0], pair[1]
|
localUidStr, filerUidStr := pair[0], pair[1]
|
||||||
localUid, localUidErr := strconv.Atoi(localUidStr)
|
localUid, localUidErr := strconv.Atoi(localUidStr)
|
||||||
if localUidErr != nil {
|
if localUidErr != nil {
|
||||||
err = fmt.Errorf("failed to parse local %d: %v", localUidStr, localUidErr)
|
err = fmt.Errorf("failed to parse local %s: %v", localUidStr, localUidErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
filerUid, filerUidErr := strconv.Atoi(filerUidStr)
|
filerUid, filerUidErr := strconv.Atoi(filerUidStr)
|
||||||
|
Loading…
Reference in New Issue
Block a user