private void HandleDeleteSegment(ApiRequest request)
{
var path = GetPathToSegment(request.RequiredParam("id"));
if(!RobustFile.Exists(path))
{
request.Succeeded();
}
else
{
try
{
RobustFile.Delete(path);
request.Succeeded();
}
catch(IOException e)
{
var msg =
string.Format(
LocalizationManager.GetString("Errors.ProblemDeletingFile", "Bloom had a problem deleting this file: {0}"), path);
ErrorReport.NotifyUserOfProblem(e, msg + Environment.NewLine + e.Message);
}
}
}