Merge lp:~hamo/snappy/check_local_dir into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Yang Bai
Status: Merged
Approved by: Michael Vogt
Approved revision: 337
Merged at revision: 337
Proposed branch: lp:~hamo/snappy/check_local_dir
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 12 lines (+1/-1)
1 file modified
snappy/install.go (+1/-1)
To merge this branch: bzr merge lp:~hamo/snappy/check_local_dir
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+256012@code.launchpad.net

Commit message

When consuming local snappy parts, check whether the name is a regular file.

To post a comment you must log in.
lp:~hamo/snappy/check_local_dir updated
337. By Yang Bai

When consuming local snappy parts, check whether the name is a regular file

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your contribution! Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snappy/install.go'
2--- snappy/install.go 2015-04-07 13:50:22 +0000
3+++ snappy/install.go 2015-04-13 19:05:12 +0000
4@@ -75,7 +75,7 @@
5
6 func doInstall(name string, flags InstallFlags) (string, error) {
7 // consume local parts
8- if _, err := os.Stat(name); err == nil {
9+ if fi, err := os.Stat(name); err == nil && fi.Mode().IsRegular() {
10 // we allow unauthenticated package when in developer
11 // mode
12 if inDeveloperMode() {

Subscribers

People subscribed via source and target branches