fix: correct handling opts.PostprocDisabled

This commit is contained in:
2025-06-25 08:07:58 +03:00
parent e8202060d8
commit db19133254
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
} }