Merge lp:~mvo/snappy/15.04-fix-off-by-one into lp:~snappy-dev/snappy/15.04-deprecated

Proposed by Michael Vogt
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 473
Merged at revision: 477
Proposed branch: lp:~mvo/snappy/15.04-fix-off-by-one
Merge into: lp:~snappy-dev/snappy/15.04-deprecated
Prerequisite: lp:~mvo/snappy/15.04-watchdog-config
Diff against target: 27 lines (+3/-3)
2 files modified
coreconfig/config.go (+1/-1)
coreconfig/config_test.go (+2/-2)
To merge this branch: bzr merge lp:~mvo/snappy/15.04-fix-off-by-one
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Review via email: mp+270627@code.launchpad.net

This proposal supersedes a proposal from 2015-09-10.

Commit message

Fix off-by-one error in the path handlng

Description of the change

Fix off-by-one error in the path handlng

To post a comment you must log in.
Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'coreconfig/config.go'
2--- coreconfig/config.go 2015-09-10 06:29:34 +0000
3+++ coreconfig/config.go 2015-09-10 06:29:34 +0000
4@@ -281,7 +281,7 @@
5 return err
6 }
7 pc = append(pc, passthroughConfig{
8- Name: path[len(rootDir)+1:],
9+ Name: path[len(rootDir):],
10 Content: string(content),
11 })
12 return nil
13
14=== modified file 'coreconfig/config_test.go'
15--- coreconfig/config_test.go 2015-09-10 06:29:34 +0000
16+++ coreconfig/config_test.go 2015-09-10 06:29:34 +0000
17@@ -79,8 +79,8 @@
18 return nil
19 }
20
21- networkRoot = c.MkDir()
22- pppRoot = c.MkDir()
23+ networkRoot = c.MkDir() + "/"
24+ pppRoot = c.MkDir() + "/"
25 watchdogConfigPath = filepath.Join(c.MkDir(), "watchdog-config")
26 watchdogStartupPath = filepath.Join(c.MkDir(), "watchdog-startup")
27 }

Subscribers

People subscribed via source and target branches