Skip to content

Commit

Permalink
Fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 8, 2010
1 parent 21e4573 commit 1a0c9b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions source/MongoDB.GridFS/GridFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ public GridFileStream OpenWrite(String filename){
/// Permanently removes a file from the database.
/// </summary>
public void Delete(Object id){
files.Delete(new Document().Add("_id", id));
chunks.Delete(new Document().Add("files_id", id));
files.Remove(new Document().Add("_id", id));
chunks.Remove(new Document().Add("files_id", id));
}

/// <summary>
/// Permanently removes a file from the database.
/// </summary>
public void Delete(String filename){
files.Delete(new Document().Add("filename", filename));
files.Remove(new Document().Add("filename", filename));
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion source/MongoDB.GridFS/GridFileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public Boolean Exists{
/// </summary>
public void Truncate(){
if(filedata.Contains("_id") == false) return;
this.gridFile.Chunks.Delete(new Document().Add("files_id", filedata["_id"]));
this.gridFile.Chunks.Remove(new Document().Add("files_id", filedata["_id"]));
this.Length = 0;
this.gridFile.Files.Save(filedata);
}
Expand Down
2 changes: 1 addition & 1 deletion source/MongoDB.GridFS/GridFileStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ private void TruncateAfter (long value)
{
int chunknum = CalcChunkNum (value);
Document spec = new Document().Add("files_id", this.gridFileInfo.Id).Add("n", new Document().Add("$gt", chunknum));
this.chunks.Delete (spec);
this.chunks.Remove(spec);
this.MoveTo (value);
Array.Copy (blankBuffer, 0, buffer, buffPosition, buffer.Length - buffPosition);
highestBuffPosition = buffPosition;
Expand Down

0 comments on commit 1a0c9b0

Please sign in to comment.