This change introduces a SafeEmptyTrashDir function. The safe implementation will only remove symbolic links if the
prefix of the target matches with the provided path, to ensure we don't remove any other unrelated symbolic links.
The SafeEmptyTrashDir will take in an arbitrary trash location
and a prefix which needs cleanup.
The symbolic links and the target paths will only be cleaned up if the target
path has the provided prefix.
Which issue(s) this PR fixes (optional)
Closes #
or
PWX-38618
Testing Notes
Added a UT
Special notes for your reviewer:
Add any notes for the reviewer here.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional)
Closes # or PWX-38618
Testing Notes
Added a UT
Special notes for your reviewer:
Add any notes for the reviewer here.