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]
|
||||
if _, ok := pathCounter[directory]; !ok {
|
||||
pathCounter[directory] = true
|
||||
if policy == control.Copy {
|
||||
folderID, errs = exchange.GetRestoreFolder(&gc.graphService, user, category)
|
||||
if errs != nil {
|
||||
return errs
|
||||
}
|
||||
folderID, errs = exchange.GetRestoreFolder(&gc.graphService, user, category)
|
||||
if errs != nil {
|
||||
return errs
|
||||
}
|
||||
}
|
||||
var exit bool
|
||||
@ -264,7 +262,6 @@ func (gc *GraphConnector) RestoreExchangeDataCollection(
|
||||
errs = support.WrapAndAppend(itemData.UUID(), err, errs)
|
||||
continue
|
||||
}
|
||||
category := dc.FullPath()[2]
|
||||
err = exchange.RestoreExchangeObject(ctx, buf.Bytes(), category, policy, &gc.graphService, folderID, user)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user