Skip to content

Commit

Permalink
don't trigger warnings when the size checks are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 31, 2021
1 parent d3501a6 commit 70e2272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xpra/codecs/icon_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def load_icon_from_file(filename, max_size=MAX_ICON_SIZE):
icondata = pngdata
filename = filename[:-3]+"png"
log("got icon data from '%s': %i bytes", filename, len(icondata))
if len(icondata)>max_size and first_time("icon-size-warning-%s" % filename):
if max_size>0 and len(icondata)>max_size and first_time("icon-size-warning-%s" % filename):
global large_icons
large_icons.append((filename, len(icondata)))
return icondata, os.path.splitext(filename)[1].lstrip(".")
Expand Down

0 comments on commit 70e2272

Please sign in to comment.