X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FDeleteAlbumPage.java;h=391e9ff8f4f1eb51860dd2a6d13f44715e3e017a;hp=e175870bca3db6f94d6b333fab8fa7e18ae2c763;hb=c2e868714435ac7c75d77d1911d0dfb00393d051;hpb=a88e930a23b550dae75116d7759924d760941776 diff --git a/src/main/java/net/pterodactylus/sone/web/DeleteAlbumPage.java b/src/main/java/net/pterodactylus/sone/web/DeleteAlbumPage.java index e175870..391e9ff 100644 --- a/src/main/java/net/pterodactylus/sone/web/DeleteAlbumPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DeleteAlbumPage.java @@ -1,5 +1,5 @@ /* - * Sone - DeleteAlbumPage.java - Copyright © 2011–2012 David Roden + * Sone - DeleteAlbumPage.java - Copyright © 2011–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ public class DeleteAlbumPage extends SoneTemplatePage { } Album parentAlbum = album.getParent(); webInterface.getCore().deleteAlbum(album); - if (parentAlbum == null) { + if (parentAlbum.equals(album.getSone().getRootAlbum())) { throw new RedirectException("imageBrowser.html?sone=" + album.getSone().getId()); } throw new RedirectException("imageBrowser.html?album=" + parentAlbum.getId());