forked from Plemya-x/ALR
fix: correct handling opts.PostprocDisabled
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//go:generate go run ../../generators/alrsh-package
|
//go:generate bash -c "go run ../../generators/alrsh-package && cd ../.. && make update-license"
|
||||||
|
|
||||||
package alrsh
|
package alrsh
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ func (FileDownloader) Download(ctx context.Context, opts Options) (Type, string,
|
|||||||
}
|
}
|
||||||
defer r.Close()
|
defer r.Close()
|
||||||
|
|
||||||
opts.PostprocDisabled = archive == "false"
|
postprocDisabled := opts.PostprocDisabled || archive == "false"
|
||||||
|
|
||||||
path := filepath.Join(opts.Destination, name)
|
path := filepath.Join(opts.Destination, name)
|
||||||
fl, err := os.Create(path)
|
fl, err := os.Create(path)
|
||||||
@ -154,7 +154,7 @@ func (FileDownloader) Download(ctx context.Context, opts Options) (Type, string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Проверка необходимости постобработки
|
// Проверка необходимости постобработки
|
||||||
if opts.PostprocDisabled {
|
if postprocDisabled {
|
||||||
return TypeFile, name, nil
|
return TypeFile, name, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user