forked from TrueCloudLab/rclone
fichier: fix accessing files > 2GB on 32 bit systems - fixes #3581
This commit is contained in:
parent
23bf6bb4d8
commit
77a520c97c
3 changed files with 5 additions and 5 deletions
|
@ -348,7 +348,7 @@ func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, size
|
||||||
Date: time.Now().Format("2006-01-02 15:04:05"),
|
Date: time.Now().Format("2006-01-02 15:04:05"),
|
||||||
Filename: link.Filename,
|
Filename: link.Filename,
|
||||||
Pass: 0,
|
Pass: 0,
|
||||||
Size: int(fileSize),
|
Size: fileSize,
|
||||||
URL: link.Download,
|
URL: link.Download,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
|
|
@ -43,7 +43,7 @@ func (o *Object) ModTime(ctx context.Context) time.Time {
|
||||||
|
|
||||||
// Size returns the size of the file
|
// Size returns the size of the file
|
||||||
func (o *Object) Size() int64 {
|
func (o *Object) Size() int64 {
|
||||||
return int64(o.file.Size)
|
return o.file.Size
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fs returns read only access to the Fs that this object is part of
|
// Fs returns read only access to the Fs that this object is part of
|
||||||
|
@ -74,7 +74,7 @@ func (o *Object) SetModTime(context.Context, time.Time) error {
|
||||||
|
|
||||||
// Open opens the file for read. Call Close() on the returned io.ReadCloser
|
// Open opens the file for read. Call Close() on the returned io.ReadCloser
|
||||||
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
|
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
|
||||||
fs.FixRangeOption(options, int64(o.file.Size))
|
fs.FixRangeOption(options, o.file.Size)
|
||||||
downloadToken, err := o.fs.getDownloadToken(ctx, o.file.URL)
|
downloadToken, err := o.fs.getDownloadToken(ctx, o.file.URL)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -69,7 +69,7 @@ type SharedFolderResponse []SharedFile
|
||||||
type SharedFile struct {
|
type SharedFile struct {
|
||||||
Filename string `json:"filename"`
|
Filename string `json:"filename"`
|
||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
Size int `json:"size"`
|
Size int64 `json:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// EndFileUploadResponse is the response structure of the corresponding request
|
// EndFileUploadResponse is the response structure of the corresponding request
|
||||||
|
@ -93,7 +93,7 @@ type File struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Filename string `json:"filename"`
|
Filename string `json:"filename"`
|
||||||
Pass int `json:"pass"`
|
Pass int `json:"pass"`
|
||||||
Size int `json:"size"`
|
Size int64 `json:"size"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue