Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Removing symlink (Windows) removes target folder too. #48

@paulbouwer

Description

@paulbouwer

The current method of removing a version in the PowerShell is a little too keen and removes the target folder in addition to the junction. This is due to the use of the following:

Remove-Item $versionToRemove.Location -Force -Recurse

This needs to be replaced with a check to see if the directory for the version is a junction. This can be achieved with:

[System.IO.File]::GetAttributes($path)

If the attributes include the following Directory, ReparsePoint, then it is a junction. The junction can be deleted as follows:

[System.IO.Directory]::Delete($path, $false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions