GC: Small GC Refactor of Restore workflow (#682)
Removal of 'unused' if-clause and category variable being updated.
This commit is contained in:
parent
0b3f345727
commit
0b7fe0fdb9
@ -239,11 +239,9 @@ func (gc *GraphConnector) RestoreExchangeDataCollection(
|
|||||||
category := dc.FullPath()[2]
|
category := dc.FullPath()[2]
|
||||||
if _, ok := pathCounter[directory]; !ok {
|
if _, ok := pathCounter[directory]; !ok {
|
||||||
pathCounter[directory] = true
|
pathCounter[directory] = true
|
||||||
if policy == control.Copy {
|
folderID, errs = exchange.GetRestoreFolder(&gc.graphService, user, category)
|
||||||
folderID, errs = exchange.GetRestoreFolder(&gc.graphService, user, category)
|
if errs != nil {
|
||||||
if errs != nil {
|
return errs
|
||||||
return errs
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var exit bool
|
var exit bool
|
||||||
@ -264,7 +262,6 @@ func (gc *GraphConnector) RestoreExchangeDataCollection(
|
|||||||
errs = support.WrapAndAppend(itemData.UUID(), err, errs)
|
errs = support.WrapAndAppend(itemData.UUID(), err, errs)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
category := dc.FullPath()[2]
|
|
||||||
err = exchange.RestoreExchangeObject(ctx, buf.Bytes(), category, policy, &gc.graphService, folderID, user)
|
err = exchange.RestoreExchangeObject(ctx, buf.Bytes(), category, policy, &gc.graphService, folderID, user)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user