diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index a34a3924..af48ada2 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -946,8 +946,9 @@ func defaultConfig(myName string) config.Configuration { if !noDefaultFolder { l.Infoln("Default folder created and/or linked to new config") - - defaultFolder = config.NewFolderConfiguration("default", locations[locDefFolder]) + folderID := util.RandomString(5) + "-" + util.RandomString(5) + defaultFolder = config.NewFolderConfiguration(folderID, locations[locDefFolder]) + defaultFolder.Label = "Default Folder (" + folderID + ")" defaultFolder.RescanIntervalS = 60 defaultFolder.MinDiskFreePct = 1 defaultFolder.Devices = []config.FolderDeviceConfiguration{{DeviceID: myID}} diff --git a/lib/util/random.go b/lib/util/random.go index 8b6c485f..21a37fde 100644 --- a/lib/util/random.go +++ b/lib/util/random.go @@ -15,7 +15,7 @@ import ( ) // randomCharset contains the characters that can make up a randomString(). -const randomCharset = "01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" +const randomCharset = "2345679abcdefghijkmnopqrstuvwxyzACDEFGHJKLMNPQRSTUVWXYZ" func init() { // The default RNG should be seeded with something good.