|
|
|
@ -93,8 +93,7 @@ func (b *LocalBackend) driveSetShareLocked(share *drive.Share) (views.SliceView[
|
|
|
|
|
|
|
|
|
|
addedShare := false
|
|
|
|
|
var shares []*drive.Share
|
|
|
|
|
for i := range existingShares.Len() {
|
|
|
|
|
existing := existingShares.At(i)
|
|
|
|
|
for _, existing := range existingShares.All() {
|
|
|
|
|
if existing.Name() != share.Name {
|
|
|
|
|
if !addedShare && existing.Name() > share.Name {
|
|
|
|
|
// Add share in order
|
|
|
|
@ -152,8 +151,7 @@ func (b *LocalBackend) driveRenameShareLocked(oldName, newName string) (views.Sl
|
|
|
|
|
|
|
|
|
|
found := false
|
|
|
|
|
var shares []*drive.Share
|
|
|
|
|
for i := range existingShares.Len() {
|
|
|
|
|
existing := existingShares.At(i)
|
|
|
|
|
for _, existing := range existingShares.All() {
|
|
|
|
|
if existing.Name() == newName {
|
|
|
|
|
return existingShares, os.ErrExist
|
|
|
|
|
}
|
|
|
|
@ -213,8 +211,7 @@ func (b *LocalBackend) driveRemoveShareLocked(name string) (views.SliceView[*dri
|
|
|
|
|
|
|
|
|
|
found := false
|
|
|
|
|
var shares []*drive.Share
|
|
|
|
|
for i := range existingShares.Len() {
|
|
|
|
|
existing := existingShares.At(i)
|
|
|
|
|
for _, existing := range existingShares.All() {
|
|
|
|
|
if existing.Name() != name {
|
|
|
|
|
shares = append(shares, existing.AsStruct())
|
|
|
|
|
} else {
|
|
|
|
|