
} catch(final IOException ex) {
return error(DB_NOT_RESTORED_X, db);</BUG>
}
<BUG>}
public static String dbName(final String backupName) {
return Pattern.compile(DateTime.PATTERN + '$').split(backupName)[0];
}
public static IOFile backupFile(final String name, final Context ctx) {
final String n = name;
final IOFile file = ctx.globalopts.dbpath(n + IO.ZIPSUFFIX);
if(file.exists()) return file;
final StringList list = Databases.backupPaths(n, ctx).sort(Prop.CASE, false);
return !list.isEmpty() ? new IOFile(list.get(0)) : null;</BUG>
}

package org.basex.core.cmd;
import static org.basex.core.Text.*;
import java.io.*;
import org.basex.core.*;
import org.basex.io.*;
import org.basex.util.*;
import org.basex.util.list.*;
public class Restore extends ABackup {
private boolean closed;
public Restore(final String arg) {
super(arg);
}
