]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Ran 'golangci-lint run -E gocritic,whitespace --fix' 🤞
[rbdr/mobius] / hotline / transaction_handlers.go
index 813d25c072185ab9f80f32915a702d28a7777da5..137b2a0583ce2288f180cc07f37a572b1654360e 100644 (file)
@@ -808,7 +808,7 @@ func HandleUpdateUser(cc *ClientConn, t *Transaction) (res []Transaction, err er
                        }
 
                        newAccess := accessBitmap{}
                        }
 
                        newAccess := accessBitmap{}
-                       copy(newAccess[:], getField(FieldUserAccess, &subFields).Data[:])
+                       copy(newAccess[:], getField(FieldUserAccess, &subFields).Data)
 
                        // Prevent account from creating new account with greater permission
                        for i := 0; i < 64; i++ {
 
                        // Prevent account from creating new account with greater permission
                        for i := 0; i < 64; i++ {
@@ -846,7 +846,7 @@ func HandleNewUser(cc *ClientConn, t *Transaction) (res []Transaction, err error
        }
 
        newAccess := accessBitmap{}
        }
 
        newAccess := accessBitmap{}
-       copy(newAccess[:], t.GetField(FieldUserAccess).Data[:])
+       copy(newAccess[:], t.GetField(FieldUserAccess).Data)
 
        // Prevent account from creating new account with greater permission
        for i := 0; i < 64; i++ {
 
        // Prevent account from creating new account with greater permission
        for i := 0; i < 64; i++ {
@@ -1605,7 +1605,6 @@ func HandleUploadFile(cc *ClientConn, t *Transaction) (res []Transaction, err er
 
        // client has requested to resume a partially transferred file
        if transferOptions != nil {
 
        // client has requested to resume a partially transferred file
        if transferOptions != nil {
-
                fileInfo, err := cc.Server.FS.Stat(fullFilePath + incompleteFileSuffix)
                if err != nil {
                        return res, err
                fileInfo, err := cc.Server.FS.Stat(fullFilePath + incompleteFileSuffix)
                if err != nil {
                        return res, err