1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

remove a duplicate codepath for folder insert

This commit is contained in:
Jesse Vincent 2011-01-18 00:04:17 +00:00
parent d59600653c
commit 65e89afc40

View File

@ -1471,24 +1471,7 @@ public class LocalStore extends Store implements Serializable
@Override @Override
public boolean create(FolderType type) throws MessagingException public boolean create(FolderType type) throws MessagingException
{ {
if (exists()) return create(type, mAccount.getDisplayCount());
{
throw new MessagingException("Folder " + mName + " already exists.");
}
database.execute(false, new DbCallback<Void>()
{
@Override
public Void doDbWork(final SQLiteDatabase db) throws WrappedException
{
db.execSQL("INSERT INTO folders (name, visible_limit) VALUES (?, ?)", new Object[]
{
mName,
mAccount.getDisplayCount()
});
return null;
}
});
return true;
} }
@Override @Override