Ignore:
Timestamp:
2019-01-27T18:58:32+01:00 (5 years ago)
Author:
simon04
Message:

see #16497 - revert r14725/r14724/r14723/r14718/r14630

Support for relative paths in .joz session file needs more testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/GenericSessionExporter.java

    r14718 r14741  
    1313import java.io.IOException;
    1414import java.io.OutputStream;
     15import java.net.MalformedURLException;
    1516
    1617import javax.swing.AbstractAction;
     
    191192            addDataFile(support.getOutputStreamZip(zipPath));
    192193        } else {
    193             File f = layer.getAssociatedFile();
    194             if (f != null) {
    195                 final String fileString = support.relativize(f.toPath());
    196                 file.appendChild(support.createTextNode(fileString));
     194            try {
     195                File f = layer.getAssociatedFile();
     196                if (f != null) {
     197                    file.appendChild(support.createTextNode(f.toURI().toURL().toString()));
     198                }
     199            } catch (MalformedURLException e) {
     200                throw new IOException(e);
    197201            }
    198202        }
Note: See TracChangeset for help on using the changeset viewer.