Skip to content

Commit

Permalink
need to change config handling again because in iran old configs have…
Browse files Browse the repository at this point in the history
… old, bad masquerades
  • Loading branch information
myleshorton committed Sep 4, 2015
1 parent 6a7c17f commit 313cc6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/github.com/getlantern/flashlight/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var (
m *yamlconf.Manager
lastCloudConfigETag = map[string]string{}
httpClient atomic.Value
r = regexp.MustCompile("\\d+")
r = regexp.MustCompile("\\d+\\.\\d+")
)

type Config struct {
Expand Down Expand Up @@ -126,7 +126,7 @@ func copyNewest(file string, existsFunc func(file string) (string, bool)) string
// Init initializes the configuration system.
func Init(version string) (*Config, error) {
file := "lantern-" + majorVersion(version) + ".yaml"
copyNewest(file, configExists)
//copyNewest(file, configExists)
configPath, err := InConfigDir(file)
if err != nil {
log.Errorf("Could not get config path? %v", err)
Expand Down
4 changes: 2 additions & 2 deletions src/github.com/getlantern/flashlight/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func TestCopyOldConfig(t *testing.T) {
}

func TestMajorVersion(t *testing.T) {
ver := "222.0.1"
ver := "222.00.1"
maj := majorVersion(ver)
assert.Equal(t, "222", maj, "Unexpected major version")
assert.Equal(t, "222.00", maj, "Unexpected major version")
}

func TestDataCenter(t *testing.T) {
Expand Down

0 comments on commit 313cc6d

Please sign in to comment.