{"action":"created","issue":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/724","labels_url":"https://api.github.com/repos/foosel/OctoPrint/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/foosel/OctoPrint/issues/724/comments","events_url":"https://api.github.com/repos/foosel/OctoPrint/issues/724/events","html_url":"https://github.com/foosel/OctoPrint/issues/724","id":54646024,"number":724,"title":"[BUG] Unable to delete timelapse from UI when filename contains parenthesis","user":{"login":"jneilliii","id":5249455,"avatar_url":"https://avatars.githubusercontent.com/u/5249455?v=3","gravatar_id":"","url":"https://api.github.com/users/jneilliii","html_url":"https://github.com/jneilliii","followers_url":"https://api.github.com/users/jneilliii/followers","following_url":"https://api.github.com/users/jneilliii/following{/other_user}","gists_url":"https://api.github.com/users/jneilliii/gists{/gist_id}","starred_url":"https://api.github.com/users/jneilliii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jneilliii/subscriptions","organizations_url":"https://api.github.com/users/jneilliii/orgs","repos_url":"https://api.github.com/users/jneilliii/repos","events_url":"https://api.github.com/users/jneilliii/events{/privacy}","received_events_url":"https://api.github.com/users/jneilliii/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-17T01:42:54Z","updated_at":"2015-01-18T19:28:06Z","closed_at":null,"body":"1. What were you doing?\r\nTrying to delete timelapse mpg within web UI.\r\n2. What did you expect to happen?\r\nFor the file to delete and remove from list in UI.\r\n3. What happened instead?\r\nFile remained on filesystem and in web UI.\r\n4. Branch & Commit or Version:\r\nVersion: 1.2.0-dev-404-gb0805a9 (devel branch)\r\n5. Printer model & used firmware incl. version\r\nN/A\r\n6. Link to octoprint.log on gist.github.com or pastebin.com:\r\nNo log entries added to octoprint.log\r\n7. Link to contents of terminal tab on gist.github.com or pastebin.com:\r\nN/A\r\n\r\nAfter investigating the issue it appears to be related to parenthesis in the filename.  If there aren't any parenthesis in the filename the operation works as expected.  Running dev branch on raspbian OS wheezy version 7.\r\n\r\nI love cookies\r\n"},"comment":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/comments/70421699","html_url":"https://github.com/foosel/OctoPrint/issues/724#issuecomment-70421699","issue_url":"https://api.github.com/repos/foosel/OctoPrint/issues/724","id":70421699,"user":{"login":"derpicknicker1","id":5983533,"avatar_url":"https://avatars.githubusercontent.com/u/5983533?v=3","gravatar_id":"","url":"https://api.github.com/users/derpicknicker1","html_url":"https://github.com/derpicknicker1","followers_url":"https://api.github.com/users/derpicknicker1/followers","following_url":"https://api.github.com/users/derpicknicker1/following{/other_user}","gists_url":"https://api.github.com/users/derpicknicker1/gists{/gist_id}","starred_url":"https://api.github.com/users/derpicknicker1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derpicknicker1/subscriptions","organizations_url":"https://api.github.com/users/derpicknicker1/orgs","repos_url":"https://api.github.com/users/derpicknicker1/repos","events_url":"https://api.github.com/users/derpicknicker1/events{/privacy}","received_events_url":"https://api.github.com/users/derpicknicker1/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T19:28:06Z","updated_at":"2015-01-18T19:28:06Z","body":"I can confirm this bug. I tested it with my Version: 1.2.0-dev-405-gf52afb8-dirty (devel branch).\r\nIt seems like _werkzeug.util.secure_filename_ causes this.\r\nYou find it in `server/api/timelapse.py` on line 53:\r\n\r\n```python\r\nsecure = os.path.join(settings().getBaseFolder(\"timelapse\"), secure_filename(filename))\r\n```\r\nUpdating the line to \r\n\r\n```python\r\nsecure = os.path.join(settings().getBaseFolder(\"timelapse\"), filename)\r\n```\r\nwill make it work. But i'm not sure if it's the best idea to leave out the _secure_filename()_. Otherwise, the filenames for timelapses are taken from the _*.gcode_ files. So i think they will allready be safe?!"}}