mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-11-22 17:26:45 +00:00
Switched to environment instead of property
This commit is contained in:
parent
20881d85d4
commit
0e09d22025
@ -7,15 +7,13 @@ import java.nio.file.StandardOpenOption;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
|
||||
|
||||
public class UrlFile {
|
||||
|
||||
private File file;
|
||||
|
||||
public UrlFile() throws IOException{
|
||||
String path = System.getProperty("file.location", "./urls.csv");
|
||||
String path = System.getenv().getOrDefault("file.location", "./urls.csv");
|
||||
this.file = new File(path);
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
|
Loading…
Reference in New Issue
Block a user