{"action":"closed","issue":{"url":"https://api.github.com/repos/Andersbakken/rtags/issues/368","labels_url":"https://api.github.com/repos/Andersbakken/rtags/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/Andersbakken/rtags/issues/368/comments","events_url":"https://api.github.com/repos/Andersbakken/rtags/issues/368/events","html_url":"https://github.com/Andersbakken/rtags/issues/368","id":90845728,"number":368,"title":"Fail with depth path ","user":{"login":"sunlin7","id":4402280,"avatar_url":"https://avatars.githubusercontent.com/u/4402280?v=3","gravatar_id":"","url":"https://api.github.com/users/sunlin7","html_url":"https://github.com/sunlin7","followers_url":"https://api.github.com/users/sunlin7/followers","following_url":"https://api.github.com/users/sunlin7/following{/other_user}","gists_url":"https://api.github.com/users/sunlin7/gists{/gist_id}","starred_url":"https://api.github.com/users/sunlin7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunlin7/subscriptions","organizations_url":"https://api.github.com/users/sunlin7/orgs","repos_url":"https://api.github.com/users/sunlin7/repos","events_url":"https://api.github.com/users/sunlin7/events{/privacy}","received_events_url":"https://api.github.com/users/sunlin7/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-25T03:55:54Z","updated_at":"2015-06-25T10:23:29Z","closed_at":"2015-06-25T10:23:29Z","body":"Hi Anders,\r\n\r\nThe rtags will fail on some deep folder, especial the path with underscore \"_\", \r\nand it's seems the function ```encodePath()``` in https://github.com/Andersbakken/rtags/blob/5af18c06059b0c31bc6905ce529110bc1ab5680f/src/RTags.h#L139-#L163 would generate an very long filename.\r\n\r\nFor example, the maximum filename length for ext4 file system is 255 bytes(```Maximum filename length``` from http://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits)\r\nA a.c under follow folder:\r\n```\r\n/tmp/test_folder_1/test_folder_2/test_folder_3/test_folder_4/test_folder_5/test_folder_6/test_folder_7/a.c\r\n```\r\nthen ```encodePath()``` with generate a path like this,\r\n```\r\n_tmp_test<underscore>folder<underscore>1_test<underscore>folder<underscore>2_test<underscore>folder<underscore>3_test<underscore>folder<underscore>4_test<underscore>folder<underscore>5_test<underscore>folder<underscore>6_test<underscore>folder<underscore>7\r\n```\r\nThis is too long as file name for ext4 system.\r\n\r\nSo, could you change ```encodePath()``` to a better method to generate the filename please?\r\nThank you.\r\n\r\nPS:I simply replace the \"/\" with \"!\" in the path, and it works for me.\r\n\r\nBest Regards\r\nLin Sun\r\n"}}