Merge lp:~sergiusens/snappy/failSooner into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Sergio Schvezov on 2015-03-31
Status: Rejected
Rejected by: Sergio Schvezov on 2015-03-31
Proposed branch: lp:~sergiusens/snappy/failSooner
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~sergiusens/snappy/uidGid
Diff against target: 15 lines (+2/-3)
1 file modified
helpers/helpers.go (+2/-3)
To merge this branch: bzr merge lp:~sergiusens/snappy/failSooner
Reviewer Review Type Date Requested Status
Sergio Schvezov Disapprove on 2015-03-31
John Lenton (community) 2015-03-31 Needs Information on 2015-03-31
Review via email: mp+254675@code.launchpad.net

Commit message

On tar unpack don't let an error slip away to deal with later.

Description of the change

Fail sooner on errors; this makes it easier to debug and troubleshoot and if the directory can't be created here, it will most likely fail to be created later anyways.

To post a comment you must log in.
John Lenton (chipaca) wrote :

I don't think this branch does what you think it does.

review: Needs Information
review: Disapprove

Unmerged revisions

289. By Sergio Schvezov on 2015-03-31

On tar unpack don't let an error slip away

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'helpers/helpers.go'
2--- helpers/helpers.go 2015-03-27 11:30:22 +0000
3+++ helpers/helpers.go 2015-03-31 02:07:19 +0000
4@@ -111,9 +111,8 @@
5 path := filepath.Join(targetDir, name)
6 info := hdr.FileInfo()
7 if info.IsDir() {
8- err := os.MkdirAll(path, info.Mode())
9- if err != nil {
10- return nil
11+ if err := os.MkdirAll(path, info.Mode()); err != nil {
12+ return err
13 }
14 } else {
15 err := os.MkdirAll(filepath.Dir(path), 0777)

Subscribers

People subscribed via source and target branches