Fixed bug in syncing on windows

This commit is contained in:
Neeraj Gupta 2023-10-25 18:09:28 +05:30
parent ae13d8557b
commit 7d72c79442
2 changed files with 3 additions and 2 deletions

View file

@ -7,7 +7,6 @@ import (
"github.com/ente-io/cli/pkg/model/export"
"io"
"os"
"strings"
)
const (
@ -101,7 +100,7 @@ func readJSONFromFile(filePath string, data interface{}) error {
func Move(source, destination string) error {
err := os.Rename(source, destination)
if err != nil && strings.Contains(err.Error(), "cross-device link") {
if err != nil {
return moveCrossDevice(source, destination)
}
return err

View file

@ -47,6 +47,8 @@ func (c *ClICtrl) createLocalFolderForRemoteAlbums(ctx context.Context, account
}
albumFolderName := filepath.Clean(album.AlbumName)
// replace : with _
albumFolderName = strings.ReplaceAll(albumFolderName, ":", "_")
albumID := album.ID
if _, ok := folderToMetaMap[albumFolderName]; ok {