Changeset 9687 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-30T15:37:54+01:00 (9 years ago)
Author:
bastiK
Message:

applied #12380 - fixed confirmation of overwriting existing file (patch by kolesar)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r9676 r9687  
    205205            }
    206206            file = new File(fn);
    207             // Confirm overwrite, except for OSX native file dialogs which already ask for confirmation (see #11362)
    208             if (!(Main.isPlatformOsx() && FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.get()) && !confirmOverwrite(file))
     207            if (!fc.getSelectedFile().exists() && !confirmOverwrite(file))
    209208                return null;
    210209        }
  • trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java

    r9674 r9687  
    348348        }
    349349
    350         if (!open && !SaveActionBase.confirmOverwrite(fc.getSelectedFile())) {
     350        if (!open && !FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.get() &&
     351            !SaveActionBase.confirmOverwrite(fc.getSelectedFile())) {
    351352            return null;
    352353        }
Note: See TracChangeset for help on using the changeset viewer.