Skip to content

Failed on relative paths  #1

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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