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

Proposed by Sergio Schvezov
Status: Rejected
Rejected by: Sergio Schvezov
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
John Lenton (community) Needs Information
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.
Revision history for this message
John Lenton (chipaca) wrote :

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

review: Needs Information
Revision history for this message
Sergio Schvezov (sergiusens) :
review: Disapprove

Unmerged revisions

289. By Sergio Schvezov

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
=== modified file 'helpers/helpers.go'
--- helpers/helpers.go 2015-03-27 11:30:22 +0000
+++ helpers/helpers.go 2015-03-31 02:07:19 +0000
@@ -111,9 +111,8 @@
111 path := filepath.Join(targetDir, name)111 path := filepath.Join(targetDir, name)
112 info := hdr.FileInfo()112 info := hdr.FileInfo()
113 if info.IsDir() {113 if info.IsDir() {
114 err := os.MkdirAll(path, info.Mode())114 if err := os.MkdirAll(path, info.Mode()); err != nil {
115 if err != nil {115 return err
116 return nil
117 }116 }
118 } else {117 } else {
119 err := os.MkdirAll(filepath.Dir(path), 0777)118 err := os.MkdirAll(filepath.Dir(path), 0777)

Subscribers

People subscribed via source and target branches