|
|
@ -292,7 +292,7 @@ func (m *ExtractArchiveTask) masterExtractArchive(ctx context.Context, dep depen
|
|
|
|
|
|
|
|
|
|
|
|
extractor, ok := format.(archives.Extractor)
|
|
|
|
extractor, ok := format.(archives.Extractor)
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return task.StatusError, fmt.Errorf("format not an extractor %s")
|
|
|
|
return task.StatusError, fmt.Errorf("format not an extractor %s", format.Extension())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
formatExt := format.Extension()
|
|
|
|
formatExt := format.Extension()
|
|
|
@ -409,6 +409,10 @@ func (m *ExtractArchiveTask) masterExtractArchive(ctx context.Context, dep depen
|
|
|
|
Props: &fs.UploadProps{
|
|
|
|
Props: &fs.UploadProps{
|
|
|
|
Uri: savePath,
|
|
|
|
Uri: savePath,
|
|
|
|
Size: f.Size(),
|
|
|
|
Size: f.Size(),
|
|
|
|
|
|
|
|
LastModified: func() *time.Time {
|
|
|
|
|
|
|
|
t := f.FileInfo.ModTime().Local()
|
|
|
|
|
|
|
|
return &t
|
|
|
|
|
|
|
|
}(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ProgressFunc: func(current, diff int64, total int64) {
|
|
|
|
ProgressFunc: func(current, diff int64, total int64) {
|
|
|
|
atomic.AddInt64(&m.progress[ProgressTypeExtractSize].Current, diff)
|
|
|
|
atomic.AddInt64(&m.progress[ProgressTypeExtractSize].Current, diff)
|
|
|
@ -779,6 +783,10 @@ func (m *SlaveExtractArchiveTask) Do(ctx context.Context) (task.Status, error) {
|
|
|
|
Props: &fs.UploadProps{
|
|
|
|
Props: &fs.UploadProps{
|
|
|
|
Uri: savePath,
|
|
|
|
Uri: savePath,
|
|
|
|
Size: f.Size(),
|
|
|
|
Size: f.Size(),
|
|
|
|
|
|
|
|
LastModified: func() *time.Time {
|
|
|
|
|
|
|
|
t := f.FileInfo.ModTime().Local()
|
|
|
|
|
|
|
|
return &t
|
|
|
|
|
|
|
|
}(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ProgressFunc: func(current, diff int64, total int64) {
|
|
|
|
ProgressFunc: func(current, diff int64, total int64) {
|
|
|
|
atomic.AddInt64(&m.progress[ProgressTypeExtractSize].Current, diff)
|
|
|
|
atomic.AddInt64(&m.progress[ProgressTypeExtractSize].Current, diff)
|
|
|
|