client: on android, do not parse config file

http://camlistore.org/issue/189

Change-Id: I9de22ce16950e4844ad82d97ff48207a80586a34
This commit is contained in:
mpl 2013-08-12 18:20:09 +02:00
parent e682cda008
commit 860f136019
2 changed files with 4 additions and 1 deletions

View File

@ -166,7 +166,7 @@ func (c *Client) TransportForConfig(tc *TransportConfig) http.RoundTripper {
httpStats.VerboseLog = tc.Verbose httpStats.VerboseLog = tc.Verbose
} }
transport = httpStats transport = httpStats
if AndroidOutput() { if onAndroid() {
transport = &AndroidStatsTransport{transport} transport = &AndroidStatsTransport{transport}
} }
return transport return transport

View File

@ -79,6 +79,9 @@ func serverKeyId() string {
} }
func parseConfig() { func parseConfig() {
if onAndroid() {
return
}
configPath := osutil.UserClientConfigPath() configPath := osutil.UserClientConfigPath()
if _, err := os.Stat(configPath); os.IsNotExist(err) { if _, err := os.Stat(configPath); os.IsNotExist(err) {
errMsg := fmt.Sprintf("Client configuration file %v does not exist. See 'camput init' to generate it.", configPath) errMsg := fmt.Sprintf("Client configuration file %v does not exist. See 'camput init' to generate it.", configPath)