filenames containing colon ':' fail to rsync and svn
Windows 10.0.17134.112 (1803) Ubuntu 18.04 LTS (Bionic Beaver)
WSL transparently translates invalid windows filename characters to some reserved unicode codepoints in order to allow valid unix filename characters. This is the case of the colon ':'.
But I noticed that this translation generates some errors when some applications handle them, for instance, rsync and svn.
For instance, the following sequence in bash:
touch :.colon
touch lhs:rhs.colon
touch regular.colon
ls -Fila *.colon
mkdir dest
rsync ./*.colon ./dest
outputs:
rsync: rename "/mnt/c/Users/jvilar/dest/.:.colon.Ty9RLI" -> ":.colon": Invalid argument (22)
rsync: rename "/mnt/c/Users/jvilar/dest/.lhs:rhs.colon.EBf7pJ" -> "lhs:rhs.colon": No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
Also, subversion fails when a file in the repository to checkout/update contains a colon:
svn: E155009: Failed to run the WC DB work queue associated with '/mnt/c/..../fast/tools/swqaPyLib/test/BatteryResultParserTestResources/testbatch_L1VmwareSimulatorSwqa_20180503_113033_473864/output/tests/validateTatooineWebServiceRequestLogs_RunWebServiceRequestLogs/WhenTryinToAccessInvalidWebServices_GivenADeviceInIdleStatus_ThenAttemptsShouldAppearInWebServiceRequestLogWebService_(('1_2' '1a224c1a7cd74a83a5fcbef9231442b3' 'https:__15_83_4_73_HP-MJF_PI_1_2'))_20180503_113450_770.out', work item 199729 (file-install 411 fast/tools/swqaPyLib/test/BatteryResultParserTestResources/testbatch_L1VmwareSimulatorSwqa_20180503_113033_473864/output/tests/validateTatooineWebServiceRequestLogs_RunWebServiceRequestLogs/WhenTryinToAccessInvalidWebServices_GivenADeviceInIdleStatus_ThenAttemptsShouldAppearInWebServiceRequestLogWebService_(('1_2' '1a224c1a7cd74a83a5fcbef9231442b3' 'https:__15_83_4_73_HP-MJF_PI_1_2'))_20180503_113450_770.out 1 0 1 1)
svn: E000002: Can't move '/mnt/c/.../.svn/tmp/svn-BfTfw1' to '/mnt/c/.../fast/tools/swqaPyLib/test/BatteryResultParserTestResources/testbatch_L1VmwareSimulatorSwqa_20180503_113033_473864/output/tests/validateTatooineWebServiceRequestLogs_RunWebServiceRequestLogs/WhenTryinToAccessInvalidWebServices_GivenADeviceInIdleStatus_ThenAttemptsShouldAppearInWebServiceRequestLogWebService_(('1_2' '1a224c1a7cd74a83a5fcbef9231442b3' 'https:__15_83_4_73_HP-MJF_PI_1_2'))_20180503_113450_770.out': No such file or directory
It could be a bug both in rsync and svn, but as they are mature applications, I suspect that maybe is a bug in the WSL.
Thanks,
Windows 10.0.17134.112 (1803)
This should be addressed in 17101 per #1514. Your scenario works for me on 17692. I can't say why it isn't working on 17134 (>17101) for you though.
I found why you don't reproduce it:
try this - it works as long as your home is under the root fs:
cd ~
touch buggy:buggy.file
mv buggy:buggy.file buggy:buggy.file.bak
but try this - this fails under a ntfs mounted path
cd /mnt/c/Users/yourhome
touch buggy:buggy.file
mv buggy:buggy.file buggy:buggy.file.bak
So I think this is not fixed in general.
No that much was supposed to be implied in my post. Win32 special characters have worked in LxFS (aka /home etc) since the beginning. The whole point of the 17101 change (message) was to support them on DrvFS (aka /mnt/c).
What needs clarification here is whether the feature really made it into the April 2018 (17134) release.

It certainly works well in 17692. But in 17394 it does not work well, me too. It fails if the second argument of rename() contains a colon and other special characters. In other words, it can be create. Can not rename to file containing colon and other special characters.
$ strace touch a:a 2>&1 | grep 'a:a'
execve("/usr/bin/touch", ["touch", "a:a"], 0x7fffe04db268 /* 16 vars */) = 0
openat(AT_FDCWD, "a:a", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
$ strace mv a:a b 2>&1 | grep 'a:a'
execve("/bin/mv", ["mv", "a:a", "b"], 0x7fffde3271f0 /* 16 vars */) = 0
lstat("a:a", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
rename("a:a", "b") = 0
$ strace touch a:a 2>&1 | grep 'a:a'
execve("/usr/bin/touch", ["touch", "a:a"], 0x7fffe04db268 /* 16 vars */) = 0
openat(AT_FDCWD, "a:a", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
$ strace mv a:a b:b 2>&1 | grep 'a:a'
execve("/bin/mv", ["mv", "a:a", "b:b"], 0x7fffcd8832a0 /* 16 vars */) = 0
lstat("a:a", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
rename("a:a", "b:b") = -1 ENOENT (No such file or directory)
write(2, "cannot move 'a:a' to 'b:b'", 26cannot move 'a:a' to 'b:b') = 26
$ strace mv a a:a 2>&1 | grep 'a:a'
execve("/bin/mv", ["mv", "a", "a:a"], 0x7fffea95d5a0 /* 16 vars */) = 0
stat("a:a", 0x7fffe158ced0) = -1 ENOENT (No such file or directory)
lstat("a:a", 0x7fffe158cbb0) = -1 ENOENT (No such file or directory)
rename("a", "a:a") = -1 ENOENT (No such file or directory)
write(2, "cannot move 'a' to 'a:a'", 24cannot move 'a' to 'a:a') = 24
Alright. Appreciate the bisect; I don't have a '134 handy. Nothing I can see in the release notes that would explain the change. But if the rename(2)/rsync(1) scenario is confirmed not working in April 18 Update (17134), but open(2)/touch(1) does, I suppose this counts as a separate issue. If it was addressed somewhere between 17134 and 17692, this is tag fixedininsiders I guess with not much more to say. Thanks for the report and follow-ups.
Can you please doublecheck if it is possible to also bind socket with ':' in name with latest insider? I just had problem using ControlMaster ~/.ssh/ctrl_%r@%h:%p in ~/.ssh with home in my %HOME%/wsl.
Wondering if this is same issue or something else I should report. Unfortunately on my work laptop I can't opt-in for insider builds.