Fix issue with not enough space

This commit is contained in:
Victor Shcherb 2011-12-26 22:36:22 +01:00
parent 644c7ac7e8
commit b66c68f463
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<resources>
<string name="download_files_not_enough_space">There is not enough space to download %1$s MB (available %2$s).</string>
<string name="download_files_question_space">Free space now ({2} MB): ! Download {0} file(s) ({1} MB)?</string>
<string name="download_files_question_space">Free space now {2} MB! Download {0} file(s) ({1} MB)?</string>
<string name="show_zoom_level_descr">Show zoom level constantly instead of ruler.</string>
<string name="show_zoom_level">Show zoom level</string>
<string name="tip_select_destination_point">Select Destination</string>

View file

@ -498,7 +498,7 @@ public class DownloadIndexActivity extends ListActivity {
Toast.makeText(this, getString(R.string.download_files_not_enough_space, sz, asz), Toast.LENGTH_LONG).show();
} else {
Builder builder = new AlertDialog.Builder(this);
if (asz - sz < 20) {
if (asz > 0 && sz/asz > 0.8) {
builder.setMessage(MessageFormat.format(getString(R.string.download_files_question_space), entriesToDownload.size(), sz,
asz));
} else {