updated linting

This commit is contained in:
Graham Steffaniak committed 2024-08-10 19:28:27 -05:00
1 parent 13ed6fe0ff
commit 03e0bc0555
3 files changed
+7 -5

No files matched your search

+2 -3
View File
@@ -2,7 +2,6 @@ package diskcache
import (
"context"
"io/ioutil"
"os"
"path/filepath"
"testing"
@@ -21,7 +20,7 @@ func TestFileCache(t *testing.T) {
)
// Create temporary directory for the cache
cacheDir, err := ioutil.TempDir("", cacheRoot)
cacheDir, err := os.MkdirTemp("", cacheRoot)
require.NoError(t, err)
defer os.RemoveAll(cacheDir) // Clean up
@@ -48,7 +47,7 @@ func TestFileCache(t *testing.T) {
func checkValue(t *testing.T, ctx context.Context, cache *FileCache, fileFullPath string, key, wantValue string) {
t.Helper()
// check actual file content
b, err := ioutil.ReadFile(fileFullPath)
b, err := os.ReadFile(fileFullPath)
require.NoError(t, err)
require.Equal(t, wantValue, string(b))
+3
View File
@@ -139,6 +139,9 @@ var resourcePutHandler = withUser(func(w http.ResponseWriter, r *http.Request, d
}
realPath, err := files.GetRealPath(d.user.Scope, r.URL.Path)
if err != nil {
return errToStatus(err), err
}
fileOpts := files.FileOptions{
Path: realPath,
Modify: d.user.Perm.Modify,
+2 -2
View File
@@ -177,7 +177,7 @@ import {
noAuth,
loginPage,
} from "@/utils/constants";
import { files, users } from "@/api";
import { files } from "@/api";
import ProgressBar from "@/components/ProgressBar.vue";
import { getHumanReadableFilesize } from "@/utils/filesizes";
import { state, getters, mutations } from "@/store"; // Import your custom store
@@ -200,7 +200,7 @@ export default {
},
computed: {
isSticky() {
getters.isStickySidebar();
return getters.isStickySidebar();
},
isMobile() {
return getters.isMobile();