This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Backslash should be added to cm_CopySrcPathToClip output

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC9.1x bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
ackuxacky
Junior Member
Junior Member


Joined: 28 Sep 2012
Posts: 21

PostPosted: Mon May 28, 2018 2:49 am    Post subject: Backslash should be added to cm_CopySrcPathToClip output Reply with quote

Dear TC Support,

The directory name (path) misses backslash at the end of the cm_CopySrcPathToClip string output as a usual directory identification.

c:\Downloads
instead of
c:\Downloads\

A correction of a behavior levels up the user experience. Thank you for correcting the behavior.
Back to top
View user's profile Send private message Send e-mail
Sir_SiLvA
Power Member
Power Member


Joined: 06 May 2003
Posts: 2790

PostPosted: Mon May 28, 2018 6:05 am    Post subject: Re: Backslash should be added to cm_CopySrcPathToClip output Reply with quote

ackuxacky wrote:

c:\Downloads
instead of
c:\Downloads\

No, not gonna happen.
"c:\Downloads" is the ONLY correct output.

PS: this is NOT a BUG but merly a (terrible) suggestion.
Back to top
View user's profile Send private message
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6082
Location: Meiningen (Südthüringen)

PostPosted: Mon May 28, 2018 9:40 am    Post subject: Reply with quote

Mh, technically a path must include a trailing path delimiter, otherwise it's a directory, not a path. Compare the Delphi ExtractFilePath() and ExtractFileDir() functions, the former includes the path delimiter while the latter strips it.

However, I guess it's not a good idea to change it after so many years, also there are other commands out there that include the path delimiter, e.g. cm_CopyFullNamesToClip.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ackuxacky
Junior Member
Junior Member


Joined: 28 Sep 2012
Posts: 21

PostPosted: Wed Jun 20, 2018 2:10 pm    Post subject: Reply with quote

Thank you for your opinions.

I don't understand yet, whether Dalai supports the idea or not. It is true that standing on a directory and calling cm_CopyFullNamesToClip copies the directory path (name) with a trailing character. Stepping into that directory and calling cm_CopySrcPathToClip copies the directory path without any trailing character.

Where is any logic in such a behavior and why should my suggestion be a non-sense?

If cm_CopySrcPathToClip is used in any script or so, duplicate trailing characters do not introduce any flaws. C:\Downloads\ and C:\Downloads\\ are interpreted the same.
Back to top
View user's profile Send private message Send e-mail
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6082
Location: Meiningen (Südthüringen)

PostPosted: Wed Jun 20, 2018 3:06 pm    Post subject: Reply with quote

ackuxacky wrote:
I don't understand yet, whether Dalai supports the idea or not.

Well, it's a simple one (for me Wink): I'll leave it to Ghisler to decide whether or not he makes any changes there. But as I already said above: I guess it's not a good idea to change it after so many years, because nobody knows which behavior other TC users rely on...

Quote:
If cm_CopySrcPathToClip is used in any script or so, duplicate trailing characters do not introduce any flaws. C:\Downloads\ and C:\Downloads\\ are interpreted the same.

Nobody can say for certain that duplicate path delimiters won't cause any trouble. The problem is that you can't project the way you work on other people. Just because you won't have any trouble with duplicate path delimiters in your workflow doesn't mean that the same applies to other people and their workflow.

In the end it's Ghisler's decision.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 3141
Location: Moscow, Russia

PostPosted: Wed Jun 20, 2018 3:17 pm    Post subject: Reply with quote

I can tell for sure there are programs that don't like double back-slashes in paths. I had to fix one of my own programs that produced them, because a user reported that it was causing a problem with some other application.
_________________
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
 
Using TC 9.20rc2 / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC9.1x bug reports (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group