dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
15

Razzy12345
@rr.com

Razzy12345 to dave

Anon

to dave

Re: [WIN7] Copy complete directory tree

said by dave:

said by RazzyInfLoop :

Is it because of backward compatible of previous Windows software?

Because of previous mostly-3rd-party software that used hardwired paths.

But here's the design tradeoff. Do you want:

a) Problems with old apps written by people that don't know how to avoid hardcoded path names - which was always bad practice.

b) Problems in old apps that don't expect loops in file systems - which has never happened before.

In order to avoid people having (a), Windows has exposed (b). I think this was the wrong choice. I'd go further: a loop in a file system is never ever the right choice.

Note, it's not junctions per se I'm complaining about, it is using junctions in such a way as to make loops.

I understand the needs of using links for poor coding but I'm asking this because you can do the same thing in Linux. Is it avoidable?
dave
Premium Member
join:2000-05-04
not in ohio

dave

Premium Member

The avoidance mechanism is "it's stupid, don't set it up like that".

If the question was about detecting stupidity...

If you own code that need to traverse the file system, you can likely do your own loop detection ("this is a symlink, have I seen it before in this path?").

I believe Posix systems place a limit on the number of symbolic links the kernel will traverse in path resolution. Offhand, I'd suppose that could work in Windows too.