Merge lp:~axwalk/juju-core/windows-storage-datasource-path into lp:~go-bot/juju-core/trunk

Proposed by Andrew Wilkins
Status: Merged
Approved by: Andrew Wilkins
Approved revision: no longer in the source branch.
Merged at revision: 2186
Proposed branch: lp:~axwalk/juju-core/windows-storage-datasource-path
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 26 lines (+4/-4)
1 file modified
environs/storage/storage.go (+4/-4)
To merge this branch: bzr merge lp:~axwalk/juju-core/windows-storage-datasource-path
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+200953@code.launchpad.net

Commit message

environs/storage: use path.Join for datasource

I'm trying to get bootstrap working on Windows again,
and found that the simplestreams lookup was going to
the wrong URL (using '\\' instead of '/' as it should).
This was causing tools lookup to fail.

https://codereview.appspot.com/49610043/

Description of the change

environs/storage: use path.Join for datasource

I'm trying to get bootstrap working on Windows again,
and found that the simplestreams lookup was going to
the wrong URL (using '\\' instead of '/' as it should).
This was causing tools lookup to fail.

https://codereview.appspot.com/49610043/

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+200953_code.launchpad.net,

Message:
Please take a look.

Description:
environs/storage: use path.Join for datasource

I'm trying to get bootstrap working on Windows again,
and found that the simplestreams lookup was going to
the wrong URL (using '\\' instead of '/' as it should).
This was causing tools lookup to fail.

https://code.launchpad.net/~axwalk/juju-core/windows-storage-datasource-path/+merge/200953

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/49610043/

Affected files (+6, -4 lines):
   A [revision details]
   M environs/storage/storage.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-20140106181553-6uzfea71izl68d4l
+New revision: <email address hidden>

Index: environs/storage/storage.go
=== modified file 'environs/storage/storage.go'
--- environs/storage/storage.go 2013-11-01 06:20:19 +0000
+++ environs/storage/storage.go 2014-01-09 05:27:24 +0000
@@ -6,7 +6,7 @@
  import (
   "fmt"
   "io"
- "path/filepath"
+ "path"

   "launchpad.net/juju-core/environs/simplestreams"
   "launchpad.net/juju-core/utils"
@@ -91,10 +91,10 @@
   return &storageSimpleStreamsDataSource{basePath, storage, false}
  }

-func (s *storageSimpleStreamsDataSource) relpath(path string) string {
- relpath := path
+func (s *storageSimpleStreamsDataSource) relpath(storagePath string)
string {
+ relpath := storagePath
   if s.basePath != "" {
- relpath = filepath.Join(s.basePath, relpath)
+ relpath = path.Join(s.basePath, relpath)
   }
   return relpath
  }

Revision history for this message
Ian Booth (wallyworld) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'environs/storage/storage.go'
2--- environs/storage/storage.go 2013-11-01 06:20:19 +0000
3+++ environs/storage/storage.go 2014-01-09 05:30:20 +0000
4@@ -6,7 +6,7 @@
5 import (
6 "fmt"
7 "io"
8- "path/filepath"
9+ "path"
10
11 "launchpad.net/juju-core/environs/simplestreams"
12 "launchpad.net/juju-core/utils"
13@@ -91,10 +91,10 @@
14 return &storageSimpleStreamsDataSource{basePath, storage, false}
15 }
16
17-func (s *storageSimpleStreamsDataSource) relpath(path string) string {
18- relpath := path
19+func (s *storageSimpleStreamsDataSource) relpath(storagePath string) string {
20+ relpath := storagePath
21 if s.basePath != "" {
22- relpath = filepath.Join(s.basePath, relpath)
23+ relpath = path.Join(s.basePath, relpath)
24 }
25 return relpath
26 }

Subscribers

People subscribed via source and target branches

to status/vote changes: