Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm installing TCE and see double slashes ( // ) in the installation path. Why they are there?

 100% - /usr/local/games/enemy-territory//tcetest/ReadMe.rtf
 100% - /usr/local/games/enemy-territory//tcetest/changelog.rtf
 100% - /usr/local/games/enemy-territory//tcetest/ui.mp.i386.so
 100% - /usr/local/games/enemy-territory//tcetest/qagame.mp.i386.so
 100% - /usr/local/games/enemy-territory//tcetest/pak3.pk3
 100% - /usr/local/games/enemy-territory//tcetest/pak2.pk3
share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

This happens very often and it's harmless. Double slash is interpreted like simple slash.

(see man path_resolution to understand the path resolution process)

share|improve this answer
    
Can you post any article where can i check it? –  Miro Jul 23 '11 at 11:47
    
I've edited my post. The issue with double slash is not explicitly mentioned in the man page though, but you can deduce the answer. –  Stéphane Gimenez Jul 23 '11 at 11:54
1  
So still, the actual question left: why are they there? :) –  slhck Jul 23 '11 at 12:38
    
simple: programming. It is better to have it than not to and you always run it through some sort of "path.normalize()" in lang/tool of your choice. :) –  bgs May 16 '13 at 18:01
add comment

It's simply the result of concatenating paths as ordinary text strings.

For example, if you specify the destination directory including the ending slash...

make DESTDIR=/usr/local/games/enemy-territory/ install

...and the installer uses it like this:

$(DESTDIR)/tcetest/pak3.pk3

When the line above gets expanded, $(DESTDIR) simply will be replaced with the exact contents of the variable, resulting in:

/usr/local/games/enemy-territory//tcetest/pak3.pk3

As Stéphane mentioned in their answer, having two slashes in a path is entirely harmless, which is why most install scripts don't bother with removing them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.