Skip to content
Snippets Groups Projects
Commit 4c7ca123 authored by srosse's avatar srosse
Browse files

no-jira: append .zip to the filename if not already there

parent 20abcac0
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,13 @@ public class CmdZip extends FormBasicController implements FolderCommand {
*
* @see org.olat.core.commons.modules.bc.commands.AbstractCreateItemForm#formOK(org.olat.core.gui.UserRequest)
*/
@Override
protected void formOK(UserRequest ureq) {
String name = textElement.getValue();
if(!name.toLowerCase().endsWith(".zip")) {
name += ".zip";
}
VFSItem zipFile = currentContainer.createChildLeaf(name);
if (zipFile == null) {
fireEvent(ureq, Event.FAILED_EVENT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment