Save all modified projects before importing new one - hopefully helps

#528
This commit is contained in:
Tom Morris 2013-08-05 14:10:26 -04:00
parent 57f5e9873d
commit 3500f20e47

View File

@ -46,6 +46,7 @@ import org.json.JSONObject;
import org.json.JSONWriter;
import com.google.refine.Jsonizable;
import com.google.refine.ProjectManager;
import com.google.refine.ProjectMetadata;
import com.google.refine.model.Project;
import com.google.refine.util.JSONUtilities;
@ -167,6 +168,11 @@ public class ImportingJob implements Jsonizable {
if (project != null) {
project.dispose();
}
// Make sure all projects have been saved in case we run out of memory
// or have some other catastrophe on import
ProjectManager.singleton.save(true);
project = new Project();
metadata = new ProjectMetadata();
}