Skip to content
Snippets Groups Projects
Commit 3e5d2fea authored by stepan's avatar stepan
Browse files

RDeparse make sure file separator is not used in filename

parent c82d1f9f
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ import static java.nio.file.StandardOpenOption.CREATE_NEW; ...@@ -15,6 +15,7 @@ import static java.nio.file.StandardOpenOption.CREATE_NEW;
import static java.nio.file.StandardOpenOption.WRITE; import static java.nio.file.StandardOpenOption.WRITE;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.AccessDeniedException; import java.nio.file.AccessDeniedException;
import java.nio.file.FileAlreadyExistsException; import java.nio.file.FileAlreadyExistsException;
...@@ -368,7 +369,7 @@ public class RDeparse { ...@@ -368,7 +369,7 @@ public class RDeparse {
// just use the first 10 hex digits to have a nicer file name // just use the first 10 hex digits to have a nicer file name
if (qualifiedFunctionName != null && !qualifiedFunctionName.isEmpty() && !qualifiedFunctionName.equals("<no source>")) { if (qualifiedFunctionName != null && !qualifiedFunctionName.isEmpty() && !qualifiedFunctionName.equals("<no source>")) {
path = tmpDir.resolve(qualifiedFunctionName + "-" + printHexBinary.substring(0, 10) + ".r"); path = tmpDir.resolve(qualifiedFunctionName.replace(File.separatorChar, '_') + "-" + printHexBinary.substring(0, 10) + ".r");
} else { } else {
path = tmpDir.resolve(printHexBinary.substring(0, 10) + ".r"); path = tmpDir.resolve(printHexBinary.substring(0, 10) + ".r");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment