]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/srtm/DownloadSrtmFunction.java
Version 18.6, December 2016
[GpsPrune.git] / tim / prune / function / srtm / DownloadSrtmFunction.java
index 8517cd0e88e083aa78d763e38754219e04b1e590..0350ce38ddc7af88508523fa9b2f9f7ef14d41be 100644 (file)
@@ -175,7 +175,12 @@ public class DownloadSrtmFunction extends GenericFunction implements Runnable
                if (errorMessage != null) {
                        _app.showErrorMessageNoLookup(getNameKey(), errorMessage);
                }
-               else if (numDownloaded > 0)
+               else if (numDownloaded == 1)
+               {
+                       JOptionPane.showMessageDialog(_parentFrame, I18nManager.getTextWithNumber("confirm.downloadsrtm.1", numDownloaded),
+                               I18nManager.getText(getNameKey()), JOptionPane.INFORMATION_MESSAGE);
+               }
+               else if (numDownloaded > 1)
                {
                        JOptionPane.showMessageDialog(_parentFrame, I18nManager.getTextWithNumber("confirm.downloadsrtm", numDownloaded),
                                I18nManager.getText(getNameKey()), JOptionPane.INFORMATION_MESSAGE);
@@ -199,7 +204,7 @@ public class DownloadSrtmFunction extends GenericFunction implements Runnable
                        if (srtmDir.exists() && srtmDir.isDirectory() && srtmDir.canRead())
                        {
                                File srtmFile = new File(srtmDir, new File(inUrl.getFile()).getName());
-                               if (!srtmFile.exists() || !srtmFile.canRead() || srtmFile.length() <= 1) {
+                               if (!srtmFile.exists() || !srtmFile.canRead() || srtmFile.length() <= 400) {
                                        return srtmFile;
                                }
                        }