mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Fix: get execute file path dynamically
This commit is contained in:
@@ -78,7 +78,7 @@ func (fs *FileSystem) Compress(ctx context.Context, folderIDs, fileIDs []uint, i
|
||||
saveFolder = "compress"
|
||||
}
|
||||
zipFilePath := filepath.Join(
|
||||
model.GetSettingByName("temp_path"),
|
||||
util.RelativePath(model.GetSettingByName("temp_path")),
|
||||
saveFolder,
|
||||
fmt.Sprintf("archive_%d.zip", time.Now().UnixNano()),
|
||||
)
|
||||
@@ -217,7 +217,7 @@ func (fs *FileSystem) Decompress(ctx context.Context, src, dst string) error {
|
||||
}
|
||||
|
||||
tempZipFilePath = filepath.Join(
|
||||
model.GetSettingByName("temp_path"),
|
||||
util.RelativePath(model.GetSettingByName("temp_path")),
|
||||
"decompress",
|
||||
fmt.Sprintf("archive_%d.zip", time.Now().UnixNano()),
|
||||
)
|
||||
@@ -291,8 +291,8 @@ func (fs *FileSystem) Decompress(ctx context.Context, src, dst string) error {
|
||||
|
||||
select {
|
||||
case <-worker:
|
||||
wg.Add(1)
|
||||
go func(fileStream io.ReadCloser, size int64) {
|
||||
wg.Add(1)
|
||||
defer func() {
|
||||
worker <- 1
|
||||
wg.Done()
|
||||
|
||||
Reference in New Issue
Block a user