- action->file_->size = action->file_->current_position;
-
- sg_size_t* psize = new sg_size_t;
- *psize = action->file_->size;
- std::map<std::string, sg_size_t*>* content_dict = action->storage_->content_;
- auto entry = content_dict->find(action->file_->name);
- delete entry->second;
- entry->second = psize;
+ action->file_->setSize(action->file_->tell());
+
+ action->storage_->content_->erase(action->file_->cname());
+ action->storage_->content_->insert({action->file_->cname(), action->file_->size()});