{"action":"opened","issue":{"url":"https://api.github.com/repos/thomaswilburn/Caret/issues/377","labels_url":"https://api.github.com/repos/thomaswilburn/Caret/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/thomaswilburn/Caret/issues/377/comments","events_url":"https://api.github.com/repos/thomaswilburn/Caret/issues/377/events","html_url":"https://github.com/thomaswilburn/Caret/issues/377","id":68405900,"number":377,"title":"Overwriting file with zero-bytes","user":{"login":"waxim","id":3833567,"avatar_url":"https://avatars.githubusercontent.com/u/3833567?v=3","gravatar_id":"","url":"https://api.github.com/users/waxim","html_url":"https://github.com/waxim","followers_url":"https://api.github.com/users/waxim/followers","following_url":"https://api.github.com/users/waxim/following{/other_user}","gists_url":"https://api.github.com/users/waxim/gists{/gist_id}","starred_url":"https://api.github.com/users/waxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waxim/subscriptions","organizations_url":"https://api.github.com/users/waxim/orgs","repos_url":"https://api.github.com/users/waxim/repos","events_url":"https://api.github.com/users/waxim/events{/privacy}","received_events_url":"https://api.github.com/users/waxim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-14T15:13:05Z","updated_at":"2015-04-14T15:13:05Z","closed_at":null,"body":"I'm still trying to narrow this down but I'm adding this viability. Intermittently I am getting caret sending a zero-byte file overwriting the original, it seems to unload the file from caret also (though it leave the tab open but empty) which means an undo wont work. __Essentially the file is lost.__\r\n\r\nMy hunch is that its chrome unloading the tab to preserve memory, so I'm thinking an internal swap (that isn't localstorage like current sessions) for caret keeping .tmp files of the last few open tabs with a way to recover from .tmp and an 'auto-save' interval. \r\n\r\nI'm not sure its possible but it might also be good to ensure caret can't write zero (maybe with a flag in settings to turn it on) so if the data passed is empty caret will reject the change. "}}