04.12.2013 20:34, Max Kellermann пишет:
>
> We need to be careful when to merge code, because sometimes, there are
> differences; for example, UTF-8 strings shall always use slash and
> never backslash.  That is not currently documented or enforced, but
> may be a good idea to implement for better Windows compatibility.
> UTF-8 paths shall be "portable" paths, while FS paths may have OS
> specifics.
>

Agree, that's the goal exactly.

However I want to reuse the code for path combination for example 
because it could be done generally if separator stuff is abstracted.

>
> A client should never see a backslash as a path separator.  So yes, it
> should be converted (see above).
>

One more thing that I'm sure about is absolute paths handling.

Current implementation of PathTraits::IsAbsoluteUTF8() uses the same 
algorithm as PathTraits::IsAbsoluteFS() except using only slashes as 
separator. In simple words it treats C:/foo as an absolute path. It's 
not clear for me from protocol perspective if this is to be considered 
absolute path by clients*. May be we need to do some more path encoding 
e.g. like Cygwin convert C:\foo into /c/foo for better compatibility 
with clients.

* Probably this is not the problem at all at this moment. Because using 
paths outside of the music directory is only allowed via unix domain 
sockets connections which are absent on Windows.

-- 
Denis

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to