Skip to content

Commit

Permalink
Fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Feb 22, 2025
1 parent ba7a064 commit 7a4912d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/slackdump/internal/export/v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func export(ctx context.Context, sess *slackdump.Session, fsa fsadapter.FS, list
return fn(m)
}
}
src := source.NewChunkDir(chunkdir, false)
src := source.NewChunkDir(chunkdir, true)
conv := transform.NewExpConverter(src, fsa, transform.ExpWithMsgUpdateFunc(updFn()))
tf := transform.NewExportCoordinator(ctx, conv, transform.WithBufferSize(1000))
defer tf.Close()
Expand Down
1 change: 1 addition & 0 deletions internal/chunk/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func (d *Directory) Walk(fn func(name string, f *File, err error) error) error {
}
f, err := d.openRAW(path)
if err != nil {
slog.Warn("unable to open file", "path", path, "err", err)
return fn(path, nil, err)
}
cf, err := cachedFromReader(f, d.wantCache)
Expand Down
2 changes: 1 addition & 1 deletion internal/chunk/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func fromReaderWithIndex(rs io.ReadSeeker, idx index) (*File, error) {

// Close closes the underlying reader if it implements io.Closer.
func (f *File) Close() error {
if c, ok := f.rs.(io.Closer); ok {
if c, ok := f.rs.(io.Closer); f.rs != nil && ok {
return c.Close()
}
return nil
Expand Down

0 comments on commit 7a4912d

Please sign in to comment.