Suppose I have an app that transfers files placed inside a main folder to some other location.
For example, user can configure the app as below:
If placed in C:\X\A Transfer to C:\Z\A
If placed in C:\Y\B Transfer to C:\Z\B
. . .
. . .
Till now, all is well. But the following configuration would create endless transfer loops:
if placed in C:\X\A Transfer to C:\Z\A
if placed in C:\Z\A Transfer to C:\Z\B
if placed in C:\Z\B Transfer to C:\X\A
Such hierarchies can get quite complex. What would be the best way to predict them and prevent such configurations in the first place?