Skip to content

Commit

Permalink
fix: android xml icon can't save bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyc-z committed Jun 17, 2019
1 parent 9b81d4e commit 0640796
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ GEM
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
libv8 (3.16.14.19-x86_64-darwin-17)
libv8 (3.16.14.19)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/pkgs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create
@plat.validate_pkg(pkg)

pkg.save
redirect_to pkg_path pkg
redirect_to pkg_path(pkg)
rescue => e
redirect_to new_plat_pkg_path(@plat), :flash => { :error => e.message }
end
Expand All @@ -50,7 +50,7 @@ def destroy
pkg = Pkg.find params[:id]
authorize!(:destroy, pkg)
pkg.destroy!
redirect_to app_plat_path pkg.app, pkg.plat
redirect_to app_plat_path(pkg.app, pkg.plat)
end


Expand Down
2 changes: 1 addition & 1 deletion app/models/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def parser
end

def save_icon
if app_icon
if app_icon.end_with?(".png")
self.icon.store!(File.new(app_icon))
self.save
end
Expand Down
2 changes: 1 addition & 1 deletion lib/parsers/pkg_adapter/ipa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def parse

plist = zip_file.glob("Payload/*.app/Info.plist").first
@plist = plist ? ConfigParser.plist(plist.get_input_stream.read) : {}

# read icon name
if @plist["CFBundleIcons"]
app_icon_name = @plist["CFBundleIcons"]["CFBundlePrimaryIcon"]["CFBundleIconName"]
Expand Down

0 comments on commit 0640796

Please sign in to comment.