From 2a0681f3fe52cec57d6dad5205e5b4e2466b5fc5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 7 Mar 2024 11:52:50 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- auth/auth.go | 4 ++-- auth/hook.go | 8 ++++---- auth/json.go | 4 ++-- auth/none.go | 4 ++-- auth/proxy.go | 6 +++--- auth/storage.go | 4 ++-- cmd/config.go | 6 +++--- cmd/config_import.go | 4 ++-- cmd/config_init.go | 2 +- cmd/hash.go | 2 +- cmd/root.go | 16 ++++++++-------- cmd/rule_rm.go | 4 ++-- cmd/rules.go | 8 ++++---- cmd/rules_add.go | 6 +++--- cmd/upgrade.go | 2 +- cmd/users.go | 4 ++-- cmd/users_add.go | 2 +- cmd/users_find.go | 2 +- cmd/users_import.go | 2 +- cmd/users_update.go | 4 ++-- cmd/utils.go | 6 +++--- cmd/version.go | 2 +- files/file.go | 4 ++-- fileutils/file.go | 2 +- go.mod | 2 +- http/auth.go | 4 ++-- http/commands.go | 2 +- http/data.go | 10 +++++----- http/http.go | 4 ++-- http/preview.go | 4 ++-- http/public.go | 6 +++--- http/public_test.go | 8 ++++---- http/raw.go | 6 +++--- http/resource.go | 6 +++--- http/search.go | 2 +- http/settings.go | 4 ++-- http/share.go | 4 ++-- http/static.go | 8 ++++---- http/tus_handlers.go | 2 +- http/users.go | 4 ++-- http/utils.go | 2 +- main.go | 2 +- runner/parser.go | 2 +- runner/runner.go | 4 ++-- search/search.go | 2 +- settings/defaults.go | 4 ++-- settings/settings.go | 2 +- settings/storage.go | 6 +++--- share/storage.go | 2 +- storage/bolt/auth.go | 6 +++--- storage/bolt/bolt.go | 10 +++++----- storage/bolt/config.go | 2 +- storage/bolt/importer/conf.go | 8 ++++---- storage/bolt/importer/importer.go | 2 +- storage/bolt/importer/users.go | 6 +++--- storage/bolt/share.go | 4 ++-- storage/bolt/users.go | 4 ++-- storage/bolt/utils.go | 2 +- storage/storage.go | 8 ++++---- tools/go.mod | 2 +- users/storage.go | 2 +- users/users.go | 6 +++--- 63 files changed, 138 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index 23afecfc..d993bc45 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ ![Preview](https://user-images.githubusercontent.com/5447088/50716739-ebd26700-107a-11e9-9817-14230c53efd2.gif) -[![Build](https://github.com/filebrowser/filebrowser/actions/workflows/main.yaml/badge.svg)](https://github.com/filebrowser/filebrowser/actions/workflows/main.yaml) +[![Build](https://github.com/yi-you/filebrowser/actions/workflows/main.yaml/badge.svg)](https://github.com/yi-you/filebrowser/actions/workflows/main.yaml) [![Go Report Card](https://goreportcard.com/badge/github.com/filebrowser/filebrowser?style=flat-square)](https://goreportcard.com/report/github.com/filebrowser/filebrowser) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/filebrowser/filebrowser) -[![Version](https://img.shields.io/github/release/filebrowser/filebrowser.svg?style=flat-square)](https://github.com/filebrowser/filebrowser/releases/latest) +[![Version](https://img.shields.io/github/release/filebrowser/filebrowser.svg?style=flat-square)](https://github.com/yi-you/filebrowser/releases/latest) [![Chat IRC](https://img.shields.io/badge/freenode-%23filebrowser-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23filebrowser) filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app. diff --git a/auth/auth.go b/auth/auth.go index 53d5d839..868b1e3f 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -3,8 +3,8 @@ package auth import ( "net/http" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // Auther is the authentication interface. diff --git a/auth/hook.go b/auth/hook.go index 3e57560e..8d6b3025 100644 --- a/auth/hook.go +++ b/auth/hook.go @@ -9,10 +9,10 @@ import ( "os/exec" "strings" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // MethodHookAuth is used to identify hook auth. diff --git a/auth/json.go b/auth/json.go index 48f4c599..2ea8c33f 100644 --- a/auth/json.go +++ b/auth/json.go @@ -7,8 +7,8 @@ import ( "os" "strings" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // MethodJSONAuth is used to identify json auth. diff --git a/auth/none.go b/auth/none.go index f137ebc1..a3ca5327 100644 --- a/auth/none.go +++ b/auth/none.go @@ -3,8 +3,8 @@ package auth import ( "net/http" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // MethodNoAuth is used to identify no auth. diff --git a/auth/proxy.go b/auth/proxy.go index d4b19315..7cd943f8 100644 --- a/auth/proxy.go +++ b/auth/proxy.go @@ -4,9 +4,9 @@ import ( "net/http" "os" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // MethodProxyAuth is used to identify no auth. diff --git a/auth/storage.go b/auth/storage.go index c0723ba5..d71b6166 100644 --- a/auth/storage.go +++ b/auth/storage.go @@ -1,8 +1,8 @@ package auth import ( - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // StorageBackend is a storage backend for auth storage. diff --git a/cmd/config.go b/cmd/config.go index 5c7efbba..59755e77 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -11,9 +11,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/settings" ) func init() { diff --git a/cmd/config_import.go b/cmd/config_import.go index b87eb4e3..25526365 100644 --- a/cmd/config_import.go +++ b/cmd/config_import.go @@ -8,8 +8,8 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/settings" ) func init() { diff --git a/cmd/config_init.go b/cmd/config_init.go index 611e6c50..6674bc90 100644 --- a/cmd/config_init.go +++ b/cmd/config_init.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/settings" ) func init() { diff --git a/cmd/hash.go b/cmd/hash.go index 1d472a3c..b93c24ae 100644 --- a/cmd/hash.go +++ b/cmd/hash.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/root.go b/cmd/root.go index 7ec4d441..004156a3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -21,14 +21,14 @@ import ( v "github.com/spf13/viper" lumberjack "gopkg.in/natefinch/lumberjack.v2" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/diskcache" - "github.com/filebrowser/filebrowser/v2/frontend" - fbhttp "github.com/filebrowser/filebrowser/v2/http" - "github.com/filebrowser/filebrowser/v2/img" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/diskcache" + "github.com/yi-you/filebrowser/v2/frontend" + fbhttp "github.com/yi-you/filebrowser/v2/http" + "github.com/yi-you/filebrowser/v2/img" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) var ( diff --git a/cmd/rule_rm.go b/cmd/rule_rm.go index 77751069..8b8b56bf 100644 --- a/cmd/rule_rm.go +++ b/cmd/rule_rm.go @@ -5,8 +5,8 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/rules.go b/cmd/rules.go index 3bf91dd1..3df7f972 100644 --- a/cmd/rules.go +++ b/cmd/rules.go @@ -6,10 +6,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/rules_add.go b/cmd/rules_add.go index fcdc7fb4..bdcf2ad2 100644 --- a/cmd/rules_add.go +++ b/cmd/rules_add.go @@ -5,9 +5,9 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/upgrade.go b/cmd/upgrade.go index 9f747c9c..f7f0448b 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -3,7 +3,7 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/storage/bolt/importer" + "github.com/yi-you/filebrowser/v2/storage/bolt/importer" ) func init() { diff --git a/cmd/users.go b/cmd/users.go index 894a162c..c4ecb7d9 100644 --- a/cmd/users.go +++ b/cmd/users.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/users_add.go b/cmd/users_add.go index a51725da..eeed2a0f 100644 --- a/cmd/users_add.go +++ b/cmd/users_add.go @@ -3,7 +3,7 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/users_find.go b/cmd/users_find.go index b1b03bc1..cebbabfd 100644 --- a/cmd/users_find.go +++ b/cmd/users_find.go @@ -3,7 +3,7 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/users_import.go b/cmd/users_import.go index f0e1a513..7d1a15b9 100644 --- a/cmd/users_import.go +++ b/cmd/users_import.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/users_update.go b/cmd/users_update.go index 822bb6dc..d744fa5e 100644 --- a/cmd/users_update.go +++ b/cmd/users_update.go @@ -3,8 +3,8 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) func init() { diff --git a/cmd/utils.go b/cmd/utils.go index 2bd9e760..45bc7788 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -14,9 +14,9 @@ import ( "github.com/spf13/pflag" yaml "gopkg.in/yaml.v2" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/storage/bolt" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/storage/bolt" ) func checkErr(err error) { diff --git a/cmd/version.go b/cmd/version.go index 5877505e..29a59dfe 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/filebrowser/filebrowser/v2/version" + "github.com/yi-you/filebrowser/v2/version" ) func init() { diff --git a/files/file.go b/files/file.go index 4d7c8f9f..e3285014 100644 --- a/files/file.go +++ b/files/file.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/rules" ) const PermFile = 0644 diff --git a/fileutils/file.go b/fileutils/file.go index fdf11225..e826a8a6 100644 --- a/fileutils/file.go +++ b/fileutils/file.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/files" ) // MoveFile moves file from src to dst. diff --git a/go.mod b/go.mod index 03560f19..08d91efa 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/filebrowser/filebrowser/v2 +module github.com/yi-you/filebrowser/v2 go 1.20 diff --git a/http/auth.go b/http/auth.go index 69bc7dfb..66305e0e 100644 --- a/http/auth.go +++ b/http/auth.go @@ -11,8 +11,8 @@ import ( "github.com/golang-jwt/jwt/v4" "github.com/golang-jwt/jwt/v4/request" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/users" ) const ( diff --git a/http/commands.go b/http/commands.go index 55075db4..d75727f8 100644 --- a/http/commands.go +++ b/http/commands.go @@ -11,7 +11,7 @@ import ( "github.com/gorilla/websocket" - "github.com/filebrowser/filebrowser/v2/runner" + "github.com/yi-you/filebrowser/v2/runner" ) const ( diff --git a/http/data.go b/http/data.go index f584a6a5..70b0815d 100644 --- a/http/data.go +++ b/http/data.go @@ -7,11 +7,11 @@ import ( "github.com/tomasen/realip" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/runner" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/runner" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) type handleFunc func(w http.ResponseWriter, r *http.Request, d *data) (int, error) diff --git a/http/http.go b/http/http.go index 8d0c4af7..ee48f3b1 100644 --- a/http/http.go +++ b/http/http.go @@ -6,8 +6,8 @@ import ( "github.com/gorilla/mux" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" ) type modifyRequest struct { diff --git a/http/preview.go b/http/preview.go index 163d7e49..18cb44ef 100644 --- a/http/preview.go +++ b/http/preview.go @@ -10,8 +10,8 @@ import ( "github.com/gorilla/mux" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/img" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/img" ) /* diff --git a/http/public.go b/http/public.go index 7f3a309f..77b3599f 100644 --- a/http/public.go +++ b/http/public.go @@ -11,8 +11,8 @@ import ( "github.com/spf13/afero" "golang.org/x/crypto/bcrypt" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/share" ) var withHashFile = func(fn handleFunc) handleFunc { @@ -79,7 +79,7 @@ var withHashFile = func(fn handleFunc) handleFunc { } } -// ref to https://github.com/filebrowser/filebrowser/pull/727 +// ref to https://github.com/yi-you/filebrowser/pull/727 // `/api/public/dl/MEEuZK-v/file-name.txt` for old browsers to save file with correct name func ifPathWithName(r *http.Request) (id, filePath string) { pathElements := strings.Split(r.URL.Path, "/") diff --git a/http/public_test.go b/http/public_test.go index 9f89cbc0..54dded0e 100644 --- a/http/public_test.go +++ b/http/public_test.go @@ -10,10 +10,10 @@ import ( "github.com/asdine/storm/v3" "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/share" - "github.com/filebrowser/filebrowser/v2/storage/bolt" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/storage/bolt" + "github.com/yi-you/filebrowser/v2/users" ) func TestPublicShareHandlerAuthentication(t *testing.T) { diff --git a/http/raw.go b/http/raw.go index 9bf982e9..05f0ec8e 100644 --- a/http/raw.go +++ b/http/raw.go @@ -11,9 +11,9 @@ import ( "github.com/mholt/archiver/v3" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/fileutils" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/fileutils" + "github.com/yi-you/filebrowser/v2/users" ) func slashClean(name string) string { diff --git a/http/resource.go b/http/resource.go index 71c1b0d0..165e1893 100644 --- a/http/resource.go +++ b/http/resource.go @@ -14,9 +14,9 @@ import ( "github.com/shirou/gopsutil/v3/disk" "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/fileutils" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/fileutils" ) var resourceGetHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) { diff --git a/http/search.go b/http/search.go index 1c78b781..b8a7d1e7 100644 --- a/http/search.go +++ b/http/search.go @@ -4,7 +4,7 @@ import ( "net/http" "os" - "github.com/filebrowser/filebrowser/v2/search" + "github.com/yi-you/filebrowser/v2/search" ) var searchHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) { diff --git a/http/settings.go b/http/settings.go index d0599207..3af03973 100644 --- a/http/settings.go +++ b/http/settings.go @@ -4,8 +4,8 @@ import ( "encoding/json" "net/http" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/settings" ) type settingsData struct { diff --git a/http/share.go b/http/share.go index 193f0913..fa377693 100644 --- a/http/share.go +++ b/http/share.go @@ -13,8 +13,8 @@ import ( "golang.org/x/crypto/bcrypt" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/share" ) func withPermShare(fn handleFunc) handleFunc { diff --git a/http/static.go b/http/static.go index 469721e4..ab1509e1 100644 --- a/http/static.go +++ b/http/static.go @@ -12,10 +12,10 @@ import ( "strings" "text/template" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/version" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/version" ) func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys fs.FS, file, contentType string) (int, error) { diff --git a/http/tus_handlers.go b/http/tus_handlers.go index 15003cce..41fb71c9 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/files" ) func tusPostHandler() handleFunc { diff --git a/http/users.go b/http/users.go index 446057a0..ca6df1a2 100644 --- a/http/users.go +++ b/http/users.go @@ -11,8 +11,8 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/users" ) var ( diff --git a/http/utils.go b/http/utils.go index 7ef5f19e..6d674227 100644 --- a/http/utils.go +++ b/http/utils.go @@ -8,7 +8,7 @@ import ( "os" "strings" - libErrors "github.com/filebrowser/filebrowser/v2/errors" + libErrors "github.com/yi-you/filebrowser/v2/errors" ) func renderJSON(w http.ResponseWriter, _ *http.Request, data interface{}) (int, error) { diff --git a/main.go b/main.go index ab22ef45..32e54a59 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/filebrowser/filebrowser/v2/cmd" + "github.com/yi-you/filebrowser/v2/cmd" ) func main() { diff --git a/runner/parser.go b/runner/parser.go index 65891f5f..04274ee8 100644 --- a/runner/parser.go +++ b/runner/parser.go @@ -3,7 +3,7 @@ package runner import ( "os/exec" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/settings" ) // ParseCommand parses the command taking in account if the current diff --git a/runner/runner.go b/runner/runner.go index 2dbafa5c..de89b1a4 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -7,8 +7,8 @@ import ( "os/exec" "strings" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/users" ) // Runner is a commands runner. diff --git a/search/search.go b/search/search.go index 8920f92c..91468ca2 100644 --- a/search/search.go +++ b/search/search.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/rules" ) type searchOptions struct { diff --git a/settings/defaults.go b/settings/defaults.go index d60e36dc..83849082 100644 --- a/settings/defaults.go +++ b/settings/defaults.go @@ -1,8 +1,8 @@ package settings import ( - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/users" ) // UserDefaults is a type that holds the default values diff --git a/settings/settings.go b/settings/settings.go index 4e62159b..109f5b6e 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/filebrowser/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/rules" ) const DefaultUsersHomeBasePath = "/users" diff --git a/settings/storage.go b/settings/storage.go index a006a84b..0775b88c 100644 --- a/settings/storage.go +++ b/settings/storage.go @@ -1,9 +1,9 @@ package settings import ( - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/users" ) // StorageBackend is a settings storage backend. diff --git a/share/storage.go b/share/storage.go index 4cd263de..43a319a5 100644 --- a/share/storage.go +++ b/share/storage.go @@ -3,7 +3,7 @@ package share import ( "time" - "github.com/filebrowser/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/errors" ) // StorageBackend is the interface to implement for a share storage. diff --git a/storage/bolt/auth.go b/storage/bolt/auth.go index cf15a8fe..f7d440ab 100644 --- a/storage/bolt/auth.go +++ b/storage/bolt/auth.go @@ -3,9 +3,9 @@ package bolt import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/settings" ) type authBackend struct { diff --git a/storage/bolt/bolt.go b/storage/bolt/bolt.go index 6cf226d2..8d91b0e0 100644 --- a/storage/bolt/bolt.go +++ b/storage/bolt/bolt.go @@ -3,11 +3,11 @@ package bolt import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/share" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) // NewStorage creates a storage.Storage based on Bolt DB. diff --git a/storage/bolt/config.go b/storage/bolt/config.go index a4d40064..3d4e3fe2 100644 --- a/storage/bolt/config.go +++ b/storage/bolt/config.go @@ -3,7 +3,7 @@ package bolt import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/settings" ) type settingsBackend struct { diff --git a/storage/bolt/importer/conf.go b/storage/bolt/importer/conf.go index bafeb452..416b3918 100644 --- a/storage/bolt/importer/conf.go +++ b/storage/bolt/importer/conf.go @@ -11,10 +11,10 @@ import ( "github.com/pelletier/go-toml/v2" "gopkg.in/yaml.v2" - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) type oldDefs struct { diff --git a/storage/bolt/importer/importer.go b/storage/bolt/importer/importer.go index 9c737756..8d404459 100644 --- a/storage/bolt/importer/importer.go +++ b/storage/bolt/importer/importer.go @@ -3,7 +3,7 @@ package importer import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/storage/bolt" + "github.com/yi-you/filebrowser/v2/storage/bolt" ) // Import imports an old configuration to a newer database. diff --git a/storage/bolt/importer/users.go b/storage/bolt/importer/users.go index 0483402d..823047fc 100644 --- a/storage/bolt/importer/users.go +++ b/storage/bolt/importer/users.go @@ -7,9 +7,9 @@ import ( "github.com/asdine/storm/v3" bolt "go.etcd.io/bbolt" - "github.com/filebrowser/filebrowser/v2/rules" - "github.com/filebrowser/filebrowser/v2/storage" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/storage" + "github.com/yi-you/filebrowser/v2/users" ) type oldUser struct { diff --git a/storage/bolt/share.go b/storage/bolt/share.go index 99da8ad1..5f701d4c 100644 --- a/storage/bolt/share.go +++ b/storage/bolt/share.go @@ -4,8 +4,8 @@ import ( "github.com/asdine/storm/v3" "github.com/asdine/storm/v3/q" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/share" ) type shareBackend struct { diff --git a/storage/bolt/users.go b/storage/bolt/users.go index b0984bbe..8788407c 100644 --- a/storage/bolt/users.go +++ b/storage/bolt/users.go @@ -6,8 +6,8 @@ import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/users" ) type usersBackend struct { diff --git a/storage/bolt/utils.go b/storage/bolt/utils.go index 20407e15..bdefbec2 100644 --- a/storage/bolt/utils.go +++ b/storage/bolt/utils.go @@ -3,7 +3,7 @@ package bolt import ( "github.com/asdine/storm/v3" - "github.com/filebrowser/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/errors" ) func get(db *storm.DB, name string, to interface{}) error { diff --git a/storage/storage.go b/storage/storage.go index d4f1a652..6a0eab25 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -1,10 +1,10 @@ package storage import ( - "github.com/filebrowser/filebrowser/v2/auth" - "github.com/filebrowser/filebrowser/v2/settings" - "github.com/filebrowser/filebrowser/v2/share" - "github.com/filebrowser/filebrowser/v2/users" + "github.com/yi-you/filebrowser/v2/auth" + "github.com/yi-you/filebrowser/v2/settings" + "github.com/yi-you/filebrowser/v2/share" + "github.com/yi-you/filebrowser/v2/users" ) // Storage is a storage powered by a Backend which makes the necessary diff --git a/tools/go.mod b/tools/go.mod index b28e935d..f3a04e1d 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,4 +1,4 @@ -module github.com/filebrowser/filebrowser/v2/tools +module github.com/yi-you/filebrowser/v2/tools go 1.20 diff --git a/users/storage.go b/users/storage.go index 163082fb..a67eb2b3 100644 --- a/users/storage.go +++ b/users/storage.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "github.com/filebrowser/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/errors" ) // StorageBackend is the interface to implement for a users storage. diff --git a/users/users.go b/users/users.go index ec613856..c2d749b7 100644 --- a/users/users.go +++ b/users/users.go @@ -6,9 +6,9 @@ import ( "github.com/spf13/afero" - "github.com/filebrowser/filebrowser/v2/errors" - "github.com/filebrowser/filebrowser/v2/files" - "github.com/filebrowser/filebrowser/v2/rules" + "github.com/yi-you/filebrowser/v2/errors" + "github.com/yi-you/filebrowser/v2/files" + "github.com/yi-you/filebrowser/v2/rules" ) // ViewMode describes a view mode.