Mercurial Hosting > luan
diff src/goodjava/lucene/backup/Backup.java @ 1674:af18eacf187c
automatic restore
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 29 May 2022 23:38:34 -0600 |
parents | 1b9f9fdb3b41 |
children | ea7075b7afe1 |
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/Backup.java Sat May 28 21:00:30 2022 -0600 +++ b/src/goodjava/lucene/backup/Backup.java Sun May 29 23:38:34 2022 -0600 @@ -128,9 +128,9 @@ void handleZip(RpcServer rpc) throws IOException { File zip = File.createTempFile("luan_",".zip"); IoUtils.delete(zip); - String cmd = "zip -r " + zip + " " + dir.getName(); + String cmd = "zip " + zip + " *"; synchronized(this) { - Process proc = Runtime.getRuntime().exec(cmd,null,dir.getParentFile()); + Process proc = Runtime.getRuntime().exec(new String[]{"bash","-c",cmd},null,dir); IoUtils.waitFor(proc); } InputStream in = new BufferedInputStream(new FileInputStream(zip));