lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

Bug: Escape path on imported objects

Open N-o-Z opened this issue 1 year ago • 0 comments

We're missing path escaping when writing object entry during import process. This resulted in: https://github.com/treeverse/lakeFS/issues/7460

Fix: Add path escaping to the Address in this function in walk_entry_iterator.go:

func objectStoreEntryToEntryRecord(e block.ObjectStoreEntry, path string) EntryRecord {
	return EntryRecord{
		Path: Path(path),
		Entry: &Entry{
			Address:      e.Address,
			LastModified: timestamppb.New(e.Mtime),
			Size:         e.Size,
			ETag:         e.ETag,
			AddressType:  Entry_FULL,
		},
	}
}

N-o-Z avatar Feb 19 '24 12:02 N-o-Z