Changeset 17404 in josm for trunk


Ignore:
Timestamp:
2020-12-12T15:07:10+01:00 (3 months ago)
Author:
GerdP
Message:

fix #19006: Incorrect plugins path used
revert r3130, only scan directory returned by Preferences.main().getPluginsDirectory()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java

    r16824 r17404  
    1111import java.nio.file.InvalidPathException;
    1212import java.util.ArrayList;
    13 import java.util.Collection;
    1413import java.util.HashMap;
    1514import java.util.List;
    1615import java.util.Map;
    1716
     17import org.openstreetmap.josm.data.Preferences;
    1818import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1919import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     
    194194    @Override
    195195    protected void realRun() throws SAXException, IOException, OsmTransferException {
    196         Collection<String> pluginLocations = PluginInformation.getPluginLocations();
    197         getProgressMonitor().setTicksCount(pluginLocations.size() + 2);
     196        getProgressMonitor().setTicksCount(3);
    198197        if (canceled) return;
    199         for (String location : pluginLocations) {
    200             scanLocalPluginRepository(
    201                     getProgressMonitor().createSubTaskMonitor(1, false),
    202                     new File(location)
    203             );
    204             getProgressMonitor().worked(1);
    205             if (canceled) return;
    206         }
     198        scanLocalPluginRepository(
     199                getProgressMonitor().createSubTaskMonitor(1, false),
     200                Preferences.main().getPluginsDirectory()
     201        );
     202        getProgressMonitor().worked(1);
     203        if (canceled) return;
    207204        analyseInProcessPlugins();
    208205        getProgressMonitor().worked(1);
Note: See TracChangeset for help on using the changeset viewer.