WinPath icon indicating copy to clipboard operation
WinPath copied to clipboard

Installer may add an already existing value to the path

Open ANF-Studios opened this issue 3 years ago • 0 comments

If, say some installer, fails to work, but it already adds a value to the Path, it may add a duplicate value. To tackle this, the installer itself should handle this for control over the process. But, the library itself should provide general functions to help.

What we can do is add a IsAddedToPath function so that the dev/user of the lib can do

if (UserPath.IsAddedToPath("foobar"))
    return;
else
    userPath.AddToPath("foobar", moreArgs);

This should not be considered as a bug as it does not show "unexpected" behavior.

Reply to @WaifuShork if needed.

ANF-Studios avatar Apr 22 '21 20:04 ANF-Studios