rem: imgObj.site.diskusage -= imgObj.filesize; 
add: if (imgObj.site) imgObj.site.diskusage -= imgObj.filesize; 
context: function deleteImage(imgObj) {   // first remove the image from disk (and the thumbnail, if existing)   var dir = imgObj.site ? imgObj.site.getStaticDir("images") : imgObj.layout.getStaticDir();   var f = File.get(dir, imgObj.filename + "." + imgObj.fileext);   f.remove();   if (imgObj.thumbnail) {      var thumb = imgObj.thumbnail;      f = File.get(dir, thumb.filename + "." + thumb.fileext);      f.remove();      thumb.remove();   }   imgObj.site.diskusage -= imgObj.filesize;   // then, remove the image-object   imgObj.remove();   return new Message("imageDelete");}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/e844686124df85a4008f2b1eedc5c2658ddf62c7/objectFunctions.js/buggy/code/ImageMgr/objectFunctions.js