Mercurial Hosting > luan
diff src/goodjava/lucene/backup/BackupServer.java @ 1501:e66e3d50b289
mkdirs
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 10 May 2020 22:28:13 -0600 |
parents | 22e15cf73040 |
children | 8a7b6b32c691 |
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/BackupServer.java Sun May 10 13:06:11 2020 -0600 +++ b/src/goodjava/lucene/backup/BackupServer.java Sun May 10 22:28:13 2020 -0600 @@ -10,6 +10,7 @@ import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLServerSocket; import goodjava.util.SoftCacheMap; +import goodjava.io.IoUtils; import goodjava.rpc.RpcServer; import goodjava.rpc.RpcCall; import goodjava.logging.Logger; @@ -41,9 +42,9 @@ private static final ThreadPoolExecutor threadPool = (ThreadPoolExecutor)Executors.newCachedThreadPool(); private static final Map<String,Backup> backups = new SoftCacheMap<String,Backup>(); - public BackupServer(File backupDir) { + public BackupServer(File backupDir) throws IOException { this.backupDir = backupDir; - backupDir.mkdirs(); + IoUtils.mkdirs(backupDir); } public synchronized void start() throws IOException {