From 6e6c2a127b017b6838ab7a2e3cc78d7cec9845bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 19 Jan 2022 08:40:56 +0000 Subject: [PATCH] inline variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- graph/pkg/service/v0/driveitems.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph/pkg/service/v0/driveitems.go b/graph/pkg/service/v0/driveitems.go index 6341446b0..0749d0a10 100644 --- a/graph/pkg/service/v0/driveitems.go +++ b/graph/pkg/service/v0/driveitems.go @@ -115,13 +115,13 @@ func cs3TimestampToTime(t *types.Timestamp) time.Time { func cs3ResourceToDriveItem(res *storageprovider.ResourceInfo) (*libregraph.DriveItem, error) { size := new(int64) *size = int64(res.Size) // uint64 -> int :boom: - name := path.Base(res.Path) driveItem := &libregraph.DriveItem{ Id: &res.Id.OpaqueId, Size: size, } - if name != "" { + + if name := path.Base(res.Path); name != "" { driveItem.Name = &name } if res.Etag != "" {