{"action":"opened","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/1088","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/1088/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/1088/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/1088/events","html_url":"https://github.com/esp8266/Arduino/issues/1088","id":119178122,"number":1088,"title":"SPIFFS filename length > 30, causes unexpected behaviour","user":{"login":"sticilface","id":10061736,"avatar_url":"https://avatars.githubusercontent.com/u/10061736?v=3","gravatar_id":"","url":"https://api.github.com/users/sticilface","html_url":"https://github.com/sticilface","followers_url":"https://api.github.com/users/sticilface/followers","following_url":"https://api.github.com/users/sticilface/following{/other_user}","gists_url":"https://api.github.com/users/sticilface/gists{/gist_id}","starred_url":"https://api.github.com/users/sticilface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sticilface/subscriptions","organizations_url":"https://api.github.com/users/sticilface/orgs","repos_url":"https://api.github.com/users/sticilface/repos","events_url":"https://api.github.com/users/sticilface/events{/privacy}","received_events_url":"https://api.github.com/users/sticilface/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-27T11:09:58Z","updated_at":"2015-11-27T11:09:58Z","closed_at":null,"body":"Creating files of length greater than 30 causes extra characters to be appended to filename, which cannot then be deleted.  (really it is 31, but the first / counts) shown below, is an example.  \r\n```\r\n     FS File: /29aaaaaaaaaaaaaaaaaaaaaaaaaa, size: 31B\r\n     FS File: /30aaaaaaaaaaaaaaaaaaaaaaaaaaa, size: 32B\r\n     FS File: /31aaaaaaaaaaaaaaaaaaaaaaaaaaaa, size: 33B\r\n     FS File: /32aaaaaaaaaaaaaaaaaaaaaaaaaaaaa. \", size: 34B\r\n     FS File: /33aaaaaaaaaaaaaaaaaaaaaaaaaaaaa. #, size: 35B\r\n```\r\nHere is a gist that demonstrates the problem.  \r\nhttps://gist.github.com/sticilface/20c9973da4ccbe993c97\r\nWarning it deletes all files on the device.\r\n\r\nrun the sketch, then run it again and you will see that the files 32 + 33, are not deleted.  \r\n\r\nproposal  , adding length check to file.open()\r\n```\r\nFile FS::open(const char* path, const char* mode) {\r\n    if (!_impl) {\r\n        return File();\r\n    }\r\n\r\n    OpenMode om;\r\n    AccessMode am;\r\n    if (!sflags(mode, om, am)) {\r\n        DEBUGV(\"FS::open: invalid mode `%s`\\r\\n\", mode);\r\n        return File();\r\n    }\r\n\r\n    if (strlen(path) > 31) return File(); \r\n    \r\n    return File(_impl->open(path, om, am));\r\n}\r\n```"}}