From a075791974ee7d363104fde72b5e009515cc0def Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 11 Jul 2016 07:39:44 -0600 Subject: [PATCH] Add explanatory comment and fix readme typo --- README.md | 2 +- rar.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60440223..c7afd647 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Supported formats/extensions: ## Install ```bash -go get github.com/mholt/cmd/archiver +go get github.com/mholt/archiver/cmd/archiver ``` Or download binaries from the [releases](https://github.com/mholt/archiver/releases) page. diff --git a/rar.go b/rar.go index cc89aa6f..22b99fb8 100644 --- a/rar.go +++ b/rar.go @@ -46,6 +46,8 @@ func Unrar(source, destination string) error { continue } + // if files come before their containing folders, then we must + // create their folders before writing the file err = mkdir(filepath.Dir(filepath.Join(destination, header.Name))) if err != nil { return err