Skip to content

Commit 313cc6d

Browse files
committed
need to change config handling again because in iran old configs have old, bad masquerades
1 parent 6a7c17f commit 313cc6d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/github.com/getlantern/flashlight/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
m *yamlconf.Manager
4444
lastCloudConfigETag = map[string]string{}
4545
httpClient atomic.Value
46-
r = regexp.MustCompile("\\d+")
46+
r = regexp.MustCompile("\\d+\\.\\d+")
4747
)
4848

4949
type Config struct {
@@ -126,7 +126,7 @@ func copyNewest(file string, existsFunc func(file string) (string, bool)) string
126126
// Init initializes the configuration system.
127127
func Init(version string) (*Config, error) {
128128
file := "lantern-" + majorVersion(version) + ".yaml"
129-
copyNewest(file, configExists)
129+
//copyNewest(file, configExists)
130130
configPath, err := InConfigDir(file)
131131
if err != nil {
132132
log.Errorf("Could not get config path? %v", err)

src/github.com/getlantern/flashlight/config/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func TestCopyOldConfig(t *testing.T) {
3434
}
3535

3636
func TestMajorVersion(t *testing.T) {
37-
ver := "222.0.1"
37+
ver := "222.00.1"
3838
maj := majorVersion(ver)
39-
assert.Equal(t, "222", maj, "Unexpected major version")
39+
assert.Equal(t, "222.00", maj, "Unexpected major version")
4040
}
4141

4242
func TestDataCenter(t *testing.T) {

0 commit comments

Comments
 (0)