Cambiada la libreria utilizada para manejar los archivos del informe, se usa NIO ahora y deberia estar solucionado los errores con windows.
This commit is contained in:
@@ -24,15 +24,17 @@
|
||||
|
||||
package danielcortes.xyz.utils;
|
||||
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.Paths;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class FileUtils {
|
||||
public static boolean isValidPath(String path) {
|
||||
File file = new File(path);
|
||||
try {
|
||||
Paths.get(path);
|
||||
} catch (InvalidPathException | NullPointerException ex) {
|
||||
ex.printStackTrace();
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
file.getCanonicalPath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user