Skip to content

Failed on relative paths  #1

@sshikov

Description

@sshikov

When 2nd parameter for Main specified as relative name like out.txt, failed on substring here:

public OutputStream getOutputStream(final String filename) {
try {
final String path = filename.substring(0, filename.lastIndexOf(File.separatorChar));
final File dir = new File(path);
dir.mkdirs();

Should be something like new File(filename).getParentFile().mkdirs() or so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions