[#11] Add leading slash to FilePath attribute #16
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/rclone#16
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "KurlesHS/rclone:fix/add_leading_slash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When storing an object, a leading slash is added to the
FilePath
attribute. Also, now when searching for objects it is required that this attribute begin with the character/
.close #11
e0a56e1d66
to0616a569e2
@ -331,1 +333,4 @@
if objInfo.filePath == "" || objInfo.filePath[0] != '/' {
return nil, errMalformedObject
}
// Don't include a leading slash in the resulting object's file path.
Why so?
Here, we create an rclone object from a FrostFS object. The internal implementation of this backend assumes that the
object.remote
andfs.rootDirectory
fields of the object will not have a leading slash. We ensure that a slash will be added to these fields later when storing, deleting, and searching for objects in FrostFS. This is handled by thefindObjects
,deleteByPrefix
, andfillHeaders
methods.LGTM