PS Rework SyncPaths on invoking commands
nightroman opened this issue · 0 comments
Old behaviour: on invoking commands, set the current PowerShell location and
the process current directory to the active panel path.
New behaviour: on invoking commands, set the current PowerShell location to the
active panel path. Do not change the process current directory.
Some "lazy" scripts may be affected. Note that PowerShell scripts should not
rely on the process current directory, they should use PS provider locations.
NB Changing the process current directory could be removed long time ago.
Long paths
Windows PowerShell (used by PSF up to v5) has many problems with long paths.
In particular it cannot set the current location to a long path. PSF in such
cases asked users how to proceed with kind of useful but annoying dialogs.
PowerShell Core (used by PSF v6+) works better with long paths. In particular
it sets the current location just fine. Thus, these annoying errors are gone.
But if we keep temporarily changing the process current location then we get
new kind of errors (generic .NET and OS issue, not PowerShell).
That is why we finally retire changing the current directory.
This started to be clearly inconvenient in some cases.
NOTE PS and other applications may still have long path issues.
Try to avoid anything PowerShell "intensive" in long path locations.