Create a relative path

Share your advanced PureBasic knowledge/code with the community.
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Create a relative path

Post by Little John »

cas wrote:Backslash is not added because you didn't have it when you called PathRelativePathTo_() in 3rd example ( and you are talking about consistency? :lol: )
:?: :?:
I was not referring to the 3rd example at all. You might want to read carefully what I actually wrote.
cas wrote:and 5th example is root path so there is no need for backslash.
This has nothing got to do with the root directory.

And you unfortunately "forgot" to mention the main point, that is the wrong result which the WinAPI function returns in my first example.

I'd expect you to mention some facts, rather than expressing your personal belief.
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Re: Create a relative path

Post by cas »

In 1st example result is NOT wrong - your understanding of it IS wrong, i read every post 5 or 6 times before replying, i see now that you have set attribute as file in last parameter so sorry about that :( (i didn't tested the code because you already posted debug output and it was hard to see all parameters in browser with wrapped lines).
Conclusion of this discussion: both functions are valuable and both functions are consistent in their own ways (yours and MSDN one).
I don't want to offend you, i just want to be helpful so other users who read this thread don't get your facts for granted and think PathRelativePathTo_() is returning wrong results. PathRelativePathTo_() is simply intended for different kind of use.
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Create a relative path

Post by Little John »

cas wrote:In 1st example result is NOT wrong - your understanding of it IS wrong
So then you can finally tell me, what exactly is wrong with my understandig, no?
cas wrote:Conclusion of this discussion: both functions are valuable and both functions are consistent in their own ways (yours and MSDN one).
This statement doesn't become true just by repeating it. Also, up to now there is no conclusion of this "discussion" at all.
cas wrote:I don't want to offend you,
If you don't want to offend me, then at least you should read my posts carefully, before "replying" to them. Also please write concrete justified statements, rather then just some commonplaces and personal belief.
Last edited by Little John on Fri Sep 24, 2010 7:09 am, edited 1 time in total.
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Create a relative path

Post by idle »

thanks Little John this looks really useful
Post Reply