-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
id of deleted project will be kept in workspace.json #1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
are you sure the project were removed? The project only will try to recovery if the project folder is there. |
The project has been created after applying the mappings (JSON history) to the main project. After removal of the main project the project folder disappeared and the only things that has been left was the id of the main project in the workspace.json. Hence, the existence of this id causes (from my understanding) the creation of the (empty) project folder (after OpenRefine restart). |
Refine deletes the project directory and immediately saves the workspace: OpenRefine/main/src/com/google/refine/io/FileProjectManager.java Lines 325 to 336 in 6e66cb5
so it's difficult to see how this could happen unless it's unable to delete the project data directory for some reason (external tool with a file open it?). @Zazi Are you using the OpenRefine web interface? Can you provide the steps to reproduce this? |
* Restore previous constructor behavior Use modified time if we're given one. * Enhance test to cover initial read case It wasn't testing if an unnecessary project write occurs when projects are read, but not written * Make sure lastSave timestamp is initialized on load - fixes #3805 * Fix test for workspace save on project remove from PR #4796 * Save workspace when projects removed. Fixes #1418 * Refactor to clean up workspace save - only write temp file if needed rather than writing, then deleting if unneeded - check and log errors on file create/delete/rename - use try-with-resources to avoid resource leaks
I have a project that makes use of another project (as mapping table). After the processing (i.e. application of the mapping rules (JSON history) + exporting the result), I'm deleting both projects. Only the id of the main project will be kept in workspace.json. The auxiliary project (with the mapping table) disappears as expected. When I restart OpenRefine, it tries to recover the project whose id still has been left in the workspace.json. When I try to reimport both projects and do the processing afterwards, then the mapping table won't be applied. So I guess it has something to do with the incomplete removal (and the unsuccessful recovery after OpenRefine restart) of the main project.
My current workaround is that I'll give the main project each time a new name at import.
tested with OpenRefine 2.7 and 2.8
The text was updated successfully, but these errors were encountered: