Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/crypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type options struct {

pwd string //de/encrypt password
salt string
filenameEncryption string //reference drivers\crypt\meta.go Addtion
filenameEncryption string //reference drivers\crypt\meta.go Addition
dirnameEncryption string
filenameEncode string
suffix string
Expand Down
2 changes: 1 addition & 1 deletion drivers/139/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func (d *Yun139) shareHeaders() map[string]string {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0",
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"X-Deviceinfo": "||9|12.27.0|firefox|140.0|||linux unknow|1920X526|zh-CN|||",
"X-Deviceinfo": "||9|12.27.0|firefox|140.0|||linux unknown|1920X526|zh-CN|||",
"hcy-cool-flag": "1",
"CMS-DEVICE": "default",
"x-m4c-caller": "PC",
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypt/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (d *Crypt) Link(ctx context.Context, file model.Obj, _ model.LinkArgs) (*mo
rrf, err := stream.GetRangeReaderFromLink(remoteSize, remoteLink)
if err != nil {
_ = remoteLink.Close()
return nil, fmt.Errorf("the remote storage driver need to be enhanced to support encrytion")
return nil, fmt.Errorf("the remote storage driver need to be enhanced to support encryption")
}

mu := &sync.Mutex{}
Expand Down
2 changes: 1 addition & 1 deletion drivers/lanzou/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ var findFromReg = regexp.MustCompile(`data : '(.+?)'`) // 查找from字符串
func htmlFormToMap(html string) (map[string]string, error) {
forms := findFromReg.FindStringSubmatch(html)
if len(forms) != 2 {
return nil, fmt.Errorf("not find file sgin")
return nil, fmt.Errorf("not find file sign")
}
return formToMap(forms[1]), nil
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/lanzou/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ type FileOrFolderByShareUrl struct {
//T int `json:"t"`

// 文件夹特有
IsFloder bool `json:"-"`
IsFolder bool `json:"-"`

//
Url string `json:"-"`
Expand Down Expand Up @@ -162,7 +162,7 @@ func (f *FileOrFolderByShareUrl) GetSize() int64 {
}
return *f.size
}
func (f *FileOrFolderByShareUrl) IsDir() bool { return f.IsFloder }
func (f *FileOrFolderByShareUrl) IsDir() bool { return f.IsFolder }
func (f *FileOrFolderByShareUrl) ModTime() time.Time {
if f.time == nil {
time := MustParseTime(f.Time)
Expand Down
12 changes: 6 additions & 6 deletions drivers/lanzou/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,14 +572,14 @@ func (d *LanZou) getFolderByShareUrl(pwd string, sharePageData string) ([]FileOr

files := make([]FileOrFolderByShareUrl, 0)
// vip获取文件夹
floders := findSubFolderReg.FindAllStringSubmatch(sharePageData, -1)
for _, floder := range floders {
if len(floder) == 3 {
folders := findSubFolderReg.FindAllStringSubmatch(sharePageData, -1)
for _, folder := range folders {
if len(folder) == 3 {
files = append(files, FileOrFolderByShareUrl{
// Pwd: pwd, // 子文件夹不加密
ID: floder[1],
NameAll: floder[2],
IsFloder: true,
ID: folder[1],
NameAll: folder[2],
IsFolder: true,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/handles/webauthn.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func FinishAuthnLogin(c *gin.Context) {
} else { // client-side discoverable login
_, err = authnInstance.FinishDiscoverableLogin(func(_, userHandle []byte) (webauthn.User, error) {
// first param `rawID` in this callback function is equal to ID in webauthn.Credential,
// but it's unnnecessary to check it.
// but it's unnecessary to check it.
// userHandle param is equal to (User).WebAuthnID().
userID := uint(binary.LittleEndian.Uint64(userHandle))
user, err = db.GetUserById(userID)
Expand Down
2 changes: 1 addition & 1 deletion server/s3/pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/itsHenry35/gofakes3"
)

// pager splits the object list into smulitply pages.
// pager splits the object list into multiple pages.
func (db *s3Backend) pager(list *gofakes3.ObjectList, page gofakes3.ListBucketPage) (*gofakes3.ObjectList, error) {
// sort by alphabet
sort.Slice(list.CommonPrefixes, func(i, j int) bool {
Expand Down