{"action":"created","issue":{"url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/95","labels_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/95/comments","events_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/95/events","html_url":"https://github.com/hanwen/go-mtpfs/issues/95","id":91771151,"number":95,"title":"Particular characters in filename such as ':' causes a runtime error after file/folder copy/creation.","user":{"login":"FluidicTapestry","id":3475769,"avatar_url":"https://avatars.githubusercontent.com/u/3475769?v=3","gravatar_id":"","url":"https://api.github.com/users/FluidicTapestry","html_url":"https://github.com/FluidicTapestry","followers_url":"https://api.github.com/users/FluidicTapestry/followers","following_url":"https://api.github.com/users/FluidicTapestry/following{/other_user}","gists_url":"https://api.github.com/users/FluidicTapestry/gists{/gist_id}","starred_url":"https://api.github.com/users/FluidicTapestry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FluidicTapestry/subscriptions","organizations_url":"https://api.github.com/users/FluidicTapestry/orgs","repos_url":"https://api.github.com/users/FluidicTapestry/repos","events_url":"https://api.github.com/users/FluidicTapestry/events{/privacy}","received_events_url":"https://api.github.com/users/FluidicTapestry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-29T10:49:04Z","updated_at":"2015-06-30T09:54:39Z","closed_at":"2015-06-30T09:52:08Z","body":"I have mounted my Android phone using go-mtpfs (at ~/Android for clarity). I can transfer files and create folders with alphanumeric names no problem.\r\n\r\nBut if I execute:\r\n\r\nmkdir ~/Android/SD\\ card/Music/test\\\\:this\r\n\r\nthen go-mtpfs dies with a lengthy error log which I will post below because of the colon in the folder name. However, the directory was created, suggesting that the fault does not lie with Android's filesystem. If I remount and create directories within \"test:this/\", go-mtpfs dies again (and again the directory was created). The same crash occurs with files as well as folders.\r\n\r\nabc@abcxyz:~$ go-mtpfs ~/Android\r\n2015/06/29 11:36:18 FUSE mounted\r\npanic: runtime error: index out of range\r\n\r\ngoroutine 23 [running]:\r\nruntime.panic(0x5c16c0, 0x91907c)\r\n\t/usr/lib/go/src/pkg/runtime/panic.c:279 +0xf5\r\ngithub.com/hanwen/go-mtpfs/mtp.(*Device).SendObjectInfo(0xc208046180, 0xbf2f00020001, 0xc208072900, 0x0, 0x7f5e00000000, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/ops.go:194 +0x1e9\r\ngithub.com/hanwen/go-mtpfs/fs.(*folderNode).Mkdir(0xc208026540, 0xc208039710, 0x9, 0x1fd, 0xc20803aaa0, 0xc208025d08, 0x7f5ea2dfbdf0)\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:456 +0x14e\r\ngithub.com/hanwen/go-fuse/fuse/nodefs.(*rawBridge).Mkdir(0xc208025890, 0xc20803aa88, 0xc208039710, 0x9, 0xc20803a9f8, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:260 +0x9a\r\ngithub.com/hanwen/go-fuse/fuse.(*lockingRawFileSystem).Mkdir(0xc20800e880, 0xc20803aa88, 0xc208039710, 0x9, 0xc20803a9f8, 0xc200000000)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:75 +0x9c\r\ngithub.com/hanwen/go-fuse/fuse.doMkdir(0xc20807e100, 0xc20803a900)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:269 +0x8d\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).handleRequest(0xc20807e100, 0xc20803a900)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x242\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20807e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:336 +0xc5\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\n\r\ngoroutine 16 [semacquire]:\r\nsync.runtime_Semacquire(0xc208039288)\r\n\t/usr/lib/go/src/pkg/runtime/sema.goc:199 +0x30\r\nsync.(*WaitGroup).Wait(0xc20800e9e0)\r\n\t/usr/lib/go/src/pkg/sync/waitgroup.go:129 +0x14b\r\nmain.main()\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:88 +0xfbb\r\n\r\ngoroutine 19 [finalizer wait]:\r\nruntime.park(0x415e50, 0x929e58, 0x91b329)\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1369 +0x89\r\nruntime.parkunlock(0x929e58, 0x91b329)\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1385 +0x3b\r\nrunfinq()\r\n\t/usr/lib/go/src/pkg/runtime/mgc0.c:2644 +0xcf\r\nruntime.goexit()\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1445\r\n\r\ngoroutine 17 [syscall]:\r\nruntime.goexit()\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1445\r\n\r\ngoroutine 20 [semacquire]:\r\nsync.runtime_Semacquire(0xc2080382a4)\r\n\t/usr/lib/go/src/pkg/runtime/sema.goc:199 +0x30\r\nsync.(*WaitGroup).Wait(0xc20807e1e0)\r\n\t/usr/lib/go/src/pkg/sync/waitgroup.go:129 +0x14b\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc20807e100)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:306 +0x73\r\nmain.func·001()\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:83 +0x32\r\ncreated by main.main\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:85 +0xf46\r\n\r\ngoroutine 22 [syscall]:\r\nsyscall.Syscall(0x0, 0xe, 0xc20808e000, 0x11000, 0x0, 0x45b105, 0xc208078640)\r\n\t/usr/lib/go/src/pkg/syscall/asm_linux_amd64.s:21 +0x5\r\nsyscall.read(0xe, 0xc20808e000, 0x11000, 0x11000, 0x5b0bc0, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x75\r\nsyscall.Read(0xe, 0xc20808e000, 0x11000, 0x11000, 0x1, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/syscall_unix.go:136 +0x5c\r\ngithub.com/hanwen/go-fuse/fuse.func·040(0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:237 +0x69\r\ngithub.com/hanwen/go-fuse/fuse.handleEINTR(0x7f5ea2dfdf08, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:212 +0x35\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc20807e100, 0xc20803a201, 0xc20803a240, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x21a\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20807e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:317 +0x65\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\n\r\ngoroutine 24 [syscall]:\r\nsyscall.Syscall(0x0, 0xe, 0xc2080c6000, 0x11000, 0x0, 0x45b294, 0xc208025890)\r\n\t/usr/lib/go/src/pkg/syscall/asm_linux_amd64.s:21 +0x5\r\nsyscall.read(0xe, 0xc2080c6000, 0x11000, 0x11000, 0x5b0bc0, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x75\r\nsyscall.Read(0xe, 0xc2080c6000, 0x11000, 0x11000, 0x1, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/syscall_unix.go:136 +0x5c\r\ngithub.com/hanwen/go-fuse/fuse.func·040(0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:237 +0x69\r\ngithub.com/hanwen/go-fuse/fuse.handleEINTR(0x7f5ea2df9f08, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:212 +0x35\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc20807e100, 0xc20803ab01, 0xc20803ab40, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x21a\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20807e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:317 +0x65\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\ngonzo@gonzo-V5-171:~$ go-mtpfs ~/Android\r\n2015/06/29 11:37:20 FUSE mounted\r\n^[[A^[[A^[[A^[[Bpanic: runtime error: index out of range\r\n\r\ngoroutine 22 [running]:\r\nruntime.panic(0x5c16c0, 0x91907c)\r\n\t/usr/lib/go/src/pkg/runtime/panic.c:279 +0xf5\r\ngithub.com/hanwen/go-mtpfs/mtp.(*Device).SendObjectInfo(0xc208046180, 0xbf7900020001, 0xc208062b40, 0x0, 0x7f5300000000, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/ops.go:194 +0x1e9\r\ngithub.com/hanwen/go-mtpfs/fs.(*folderNode).Mkdir(0xc208026dc0, 0xc2080e81b8, 0x4, 0x1fd, 0xc20803a3e0, 0xc208024778, 0x7f53cfe78df0)\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:456 +0x14e\r\ngithub.com/hanwen/go-fuse/fuse/nodefs.(*rawBridge).Mkdir(0xc208025890, 0xc20803a3c8, 0xc2080e81b8, 0x4, 0xc20803a338, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:260 +0x9a\r\ngithub.com/hanwen/go-fuse/fuse.(*lockingRawFileSystem).Mkdir(0xc20800e880, 0xc20803a3c8, 0xc2080e81b8, 0x4, 0xc20803a338, 0xc200000000)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:75 +0x9c\r\ngithub.com/hanwen/go-fuse/fuse.doMkdir(0xc20806e100, 0xc20803a240)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:269 +0x8d\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).handleRequest(0xc20806e100, 0xc20803a240)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x242\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20806e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:336 +0xc5\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\n\r\ngoroutine 16 [semacquire, 6 minutes]:\r\nsync.runtime_Semacquire(0xc208039278)\r\n\t/usr/lib/go/src/pkg/runtime/sema.goc:199 +0x30\r\nsync.(*WaitGroup).Wait(0xc20800e9e0)\r\n\t/usr/lib/go/src/pkg/sync/waitgroup.go:129 +0x14b\r\nmain.main()\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:88 +0xfbb\r\n\r\ngoroutine 19 [finalizer wait, 6 minutes]:\r\nruntime.park(0x415e50, 0x929e58, 0x91b329)\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1369 +0x89\r\nruntime.parkunlock(0x929e58, 0x91b329)\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1385 +0x3b\r\nrunfinq()\r\n\t/usr/lib/go/src/pkg/runtime/mgc0.c:2644 +0xcf\r\nruntime.goexit()\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1445\r\n\r\ngoroutine 17 [syscall, 6 minutes]:\r\nruntime.goexit()\r\n\t/usr/lib/go/src/pkg/runtime/proc.c:1445\r\n\r\ngoroutine 20 [semacquire, 3 minutes]:\r\nsync.runtime_Semacquire(0xc208038294)\r\n\t/usr/lib/go/src/pkg/runtime/sema.goc:199 +0x30\r\nsync.(*WaitGroup).Wait(0xc20806e1e0)\r\n\t/usr/lib/go/src/pkg/sync/waitgroup.go:129 +0x14b\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc20806e100)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:306 +0x73\r\nmain.func·001()\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:83 +0x32\r\ncreated by main.main\r\n\t/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:85 +0xf46\r\n\r\ngoroutine 23 [syscall]:\r\nsyscall.Syscall(0x0, 0xe, 0xc20808e000, 0x11000, 0x0, 0x45b105, 0xc208068640)\r\n\t/usr/lib/go/src/pkg/syscall/asm_linux_amd64.s:21 +0x5\r\nsyscall.read(0xe, 0xc20808e000, 0x11000, 0x11000, 0x5b0bc0, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x75\r\nsyscall.Read(0xe, 0xc20808e000, 0x11000, 0x11000, 0x1, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/syscall_unix.go:136 +0x5c\r\ngithub.com/hanwen/go-fuse/fuse.func·040(0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:237 +0x69\r\ngithub.com/hanwen/go-fuse/fuse.handleEINTR(0x7f53cfe76f08, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:212 +0x35\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc20806e100, 0xc20803a901, 0xc20803a900, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x21a\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20806e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:317 +0x65\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\n\r\ngoroutine 24 [syscall]:\r\nsyscall.Syscall(0x0, 0xe, 0xc2080aa000, 0x11000, 0x0, 0x45b294, 0xc208025890)\r\n\t/usr/lib/go/src/pkg/syscall/asm_linux_amd64.s:21 +0x5\r\nsyscall.read(0xe, 0xc2080aa000, 0x11000, 0x11000, 0x5b0bc0, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x75\r\nsyscall.Read(0xe, 0xc2080aa000, 0x11000, 0x11000, 0x1, 0x0, 0x0)\r\n\t/usr/lib/go/src/pkg/syscall/syscall_unix.go:136 +0x5c\r\ngithub.com/hanwen/go-fuse/fuse.func·040(0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:237 +0x69\r\ngithub.com/hanwen/go-fuse/fuse.handleEINTR(0x7f53cfe74f08, 0x0, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:212 +0x35\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc20806e100, 0xc20803ab01, 0xc20803ab40, 0x0)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x21a\r\ngithub.com/hanwen/go-fuse/fuse.(*Server).loop(0xc20806e100, 0x1)\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:317 +0x65\r\ncreated by github.com/hanwen/go-fuse/fuse.(*Server).readRequest\r\n\t/tmp/go/src/github.com/hanwen/go-fuse/fuse/server.go:263 +0x644\r\n"},"comment":{"url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/comments/117103568","html_url":"https://github.com/hanwen/go-mtpfs/issues/95#issuecomment-117103568","issue_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/95","id":117103568,"user":{"login":"hanwen","id":31547,"avatar_url":"https://avatars.githubusercontent.com/u/31547?v=3","gravatar_id":"","url":"https://api.github.com/users/hanwen","html_url":"https://github.com/hanwen","followers_url":"https://api.github.com/users/hanwen/followers","following_url":"https://api.github.com/users/hanwen/following{/other_user}","gists_url":"https://api.github.com/users/hanwen/gists{/gist_id}","starred_url":"https://api.github.com/users/hanwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanwen/subscriptions","organizations_url":"https://api.github.com/users/hanwen/orgs","repos_url":"https://api.github.com/users/hanwen/repos","events_url":"https://api.github.com/users/hanwen/events{/privacy}","received_events_url":"https://api.github.com/users/hanwen/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T09:54:39Z","updated_at":"2015-06-30T09:54:39Z","body":"thanks for the report. I've stopped the crash. \r\n\r\nCuriously, the --vfat option (which defaults to true) should have stopped the \":\" from reaching the device. I'll investigate separately."}}