mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 00:43:49 +01:00
azureblob: fix creation of directory markers
This also fixes the integration tests which is why we didn't notice this before!
This commit is contained in:
parent
40bcc7a90b
commit
b1c0ae5e7d
@ -2230,8 +2230,8 @@ func (o *Object) prepareUpload(ctx context.Context, src fs.ObjectInfo, options [
|
|||||||
return ui, fmt.Errorf("can't upload to root - need a container")
|
return ui, fmt.Errorf("can't upload to root - need a container")
|
||||||
}
|
}
|
||||||
// Create parent dir/bucket if not saving directory marker
|
// Create parent dir/bucket if not saving directory marker
|
||||||
_, isDirMarker := o.meta[dirMetaKey]
|
_, ui.isDirMarker = o.meta[dirMetaKey]
|
||||||
if !isDirMarker {
|
if !ui.isDirMarker {
|
||||||
err = o.fs.mkdirParent(ctx, o.remote)
|
err = o.fs.mkdirParent(ctx, o.remote)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ui, err
|
return ui, err
|
||||||
|
@ -31,9 +31,9 @@ func TestIntegration2(t *testing.T) {
|
|||||||
if *fstest.RemoteName != "" {
|
if *fstest.RemoteName != "" {
|
||||||
t.Skip("Skipping as -remote set")
|
t.Skip("Skipping as -remote set")
|
||||||
}
|
}
|
||||||
name := "TestAzureBlob:"
|
name := "TestAzureBlob"
|
||||||
fstests.Run(t, &fstests.Opt{
|
fstests.Run(t, &fstests.Opt{
|
||||||
RemoteName: name,
|
RemoteName: name + ":",
|
||||||
NilObject: (*Object)(nil),
|
NilObject: (*Object)(nil),
|
||||||
TiersToTest: []string{"Hot", "Cool"},
|
TiersToTest: []string{"Hot", "Cool"},
|
||||||
ChunkedUpload: fstests.ChunkedUploadConfig{
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
||||||
|
Loading…
Reference in New Issue
Block a user