mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
fix azure
This commit is contained in:
+1
-3
@@ -16,8 +16,6 @@ import (
|
|||||||
|
|
||||||
// PublishedStorage abstract file system with published files (actually hosted on Azure)
|
// PublishedStorage abstract file system with published files (actually hosted on Azure)
|
||||||
type PublishedStorage struct {
|
type PublishedStorage struct {
|
||||||
container azblob.ContainerURL
|
|
||||||
prefix string
|
|
||||||
az *azContext
|
az *azContext
|
||||||
pathCache map[string]map[string]string
|
pathCache map[string]map[string]string
|
||||||
}
|
}
|
||||||
@@ -185,7 +183,7 @@ func (storage *PublishedStorage) internalCopyOrMoveBlob(src, dst string, metadat
|
|||||||
if err != nil || leaseResp.StatusCode() != http.StatusCreated {
|
if err != nil || leaseResp.StatusCode() != http.StatusCreated {
|
||||||
return fmt.Errorf("error acquiring lease on source blob %s", srcBlobURL)
|
return fmt.Errorf("error acquiring lease on source blob %s", srcBlobURL)
|
||||||
}
|
}
|
||||||
defer srcBlobURL.BreakLease(context.Background(), azblob.LeaseBreakNaturally, azblob.ModifiedAccessConditions{})
|
defer func() { _, _ = srcBlobURL.BreakLease(context.Background(), azblob.LeaseBreakNaturally, azblob.ModifiedAccessConditions{}) }()
|
||||||
srcBlobLeaseID := leaseResp.LeaseID()
|
srcBlobLeaseID := leaseResp.LeaseID()
|
||||||
|
|
||||||
copyResp, err := dstBlobURL.StartCopyFromURL(
|
copyResp, err := dstBlobURL.StartCopyFromURL(
|
||||||
|
|||||||
Reference in New Issue
Block a user