{"action":"created","issue":{"url":"https://api.github.com/repos/micro-manager/micro-manager/issues/298","repository_url":"https://api.github.com/repos/micro-manager/micro-manager","labels_url":"https://api.github.com/repos/micro-manager/micro-manager/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/micro-manager/micro-manager/issues/298/comments","events_url":"https://api.github.com/repos/micro-manager/micro-manager/issues/298/events","html_url":"https://github.com/micro-manager/micro-manager/issues/298","id":160767283,"number":298,"title":"DataManager.createMultipageTIFFDatastore overwrites existing data without prompting","user":{"login":"nicost","id":2153771,"avatar_url":"https://avatars.githubusercontent.com/u/2153771?v=3","gravatar_id":"","url":"https://api.github.com/users/nicost","html_url":"https://github.com/nicost","followers_url":"https://api.github.com/users/nicost/followers","following_url":"https://api.github.com/users/nicost/following{/other_user}","gists_url":"https://api.github.com/users/nicost/gists{/gist_id}","starred_url":"https://api.github.com/users/nicost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicost/subscriptions","organizations_url":"https://api.github.com/users/nicost/orgs","repos_url":"https://api.github.com/users/nicost/repos","events_url":"https://api.github.com/users/nicost/events{/privacy}","received_events_url":"https://api.github.com/users/nicost/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-16T21:38:41Z","updated_at":"2016-06-17T18:19:37Z","closed_at":"2016-06-17T18:19:37Z","body":"Running something like the below scripts twice results in the first data-set to be over-written on the second try.  I did not expect that behavior.  Is this indeed the intent, and is it the caller's responsibility to make sure that the storage location did not yet exist?  If so, it would be good to add this to the documentation.\r\n\r\n\r\nsaveLocation = \"/Users/nico/test/screen/test\";\r\n\r\ndata = mm.data().createMultipageTIFFDatastore(saveLocation, true, false);\r\ndw = mm.displays().createDisplay(data);\r\nmm.displays().manage(data);\r\n\r\nmm.getCMMCore().snapImage();\r\ntImg = mm.getCMMCore().getTaggedImage();\r\nc = mm.data().createCoords(\"t=0,p=0,c=0,z=0\");\r\ndata.putImage(mm.data().convertTaggedImage(tImg, c, null));\r\n\r\nmm.getCMMCore().snapImage();\r\ntImg2 = mm.getCMMCore().getTaggedImage();\r\nc2 = mm.data().createCoords(\"t=0,p=0,c=1,z=0\");\r\ndata.putImage(mm.data().convertTaggedImage(tImg2, c2, null));\r\n\r\ndata.freeze();"},"comment":{"url":"https://api.github.com/repos/micro-manager/micro-manager/issues/comments/226843483","html_url":"https://github.com/micro-manager/micro-manager/issues/298#issuecomment-226843483","issue_url":"https://api.github.com/repos/micro-manager/micro-manager/issues/298","id":226843483,"user":{"login":"ChrisWeisiger","id":10535260,"avatar_url":"https://avatars.githubusercontent.com/u/10535260?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisWeisiger","html_url":"https://github.com/ChrisWeisiger","followers_url":"https://api.github.com/users/ChrisWeisiger/followers","following_url":"https://api.github.com/users/ChrisWeisiger/following{/other_user}","gists_url":"https://api.github.com/users/ChrisWeisiger/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisWeisiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisWeisiger/subscriptions","organizations_url":"https://api.github.com/users/ChrisWeisiger/orgs","repos_url":"https://api.github.com/users/ChrisWeisiger/repos","events_url":"https://api.github.com/users/ChrisWeisiger/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisWeisiger/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T18:19:37Z","updated_at":"2016-06-17T18:19:37Z","body":"Thanks for the bug report; this is absolutely a bug. We now throw an IOException if the user attempts to create a StorageMultipageTiff \"on top of\" an existing one. Users should use `DataManager.getUniqueSaveDirectory()` to get a directory name that is safe for saving to."}}
{"actor":{"display_login":"ChrisWeisiger"}}