System.Data.SQLite
Check-in [007720e8f0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Verify the folder path exists prior to calling the PowerShell Get-ChildItem cmdlet on it during uninstall.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nugetChanges
Files: files | file ages | folders
SHA1: 007720e8f0ecd5810b68b0f5c810c40ab11f5294
User & Date: mistachkin 2014-08-19 04:34:11
Context
2014-08-19
05:08
Add some comments. check-in: 5e0ecd4053 user: mistachkin tags: nugetChanges
04:34
Verify the folder path exists prior to calling the PowerShell Get-ChildItem cmdlet on it during uninstall. check-in: 007720e8f0 user: mistachkin tags: nugetChanges
02:12
Fix typo in comment. check-in: 7879082337 user: mistachkin tags: nugetChanges
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to NuGet/net20/Core/uninstall.ps1.

37
38
39
40
41
42
43



44
45
46
47
48
49
50
51
52

  #
  # NOTE: Great care is needed here.  If the folder contains items other
  #       than the items this script is responsible for, it must be left
  #       alone.  Furthermore, the directory (on the file system) should
  #       be deleted if it ends up empty due to this script.
  #
  if ($folder.ProjectItems.Count -eq 0) {



    $folderItems = Get-ChildItem -Path $folder.FileNames(1) -Recurse

    if ($folderItems -eq $null) {
      $folder.Delete()
    } else {
      $folder.Remove()
    }
  }
}








>
>
>
|








>
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  #
  # NOTE: Great care is needed here.  If the folder contains items other
  #       than the items this script is responsible for, it must be left
  #       alone.  Furthermore, the directory (on the file system) should
  #       be deleted if it ends up empty due to this script.
  #
  if ($folder.ProjectItems.Count -eq 0) {
    $folderPath = $folder.FileNames(1)

    if (Test-Path $folderPath) {
      $folderItems = Get-ChildItem -Path $folderPath -Recurse

      if ($folderItems -eq $null) {
        $folder.Delete()
      } else {
        $folder.Remove()
      }
    }
  }
}

Changes to NuGet/net40/Core/uninstall.ps1.

37
38
39
40
41
42
43



44
45
46
47
48
49
50
51
52

  #
  # NOTE: Great care is needed here.  If the folder contains items other
  #       than the items this script is responsible for, it must be left
  #       alone.  Furthermore, the directory (on the file system) should
  #       be deleted if it ends up empty due to this script.
  #
  if ($folder.ProjectItems.Count -eq 0) {



    $folderItems = Get-ChildItem -Path $folder.FileNames(1) -Recurse

    if ($folderItems -eq $null) {
      $folder.Delete()
    } else {
      $folder.Remove()
    }
  }
}








>
>
>
|








>
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  #
  # NOTE: Great care is needed here.  If the folder contains items other
  #       than the items this script is responsible for, it must be left
  #       alone.  Furthermore, the directory (on the file system) should
  #       be deleted if it ends up empty due to this script.
  #
  if ($folder.ProjectItems.Count -eq 0) {
    $folderPath = $folder.FileNames(1)

    if (Test-Path $folderPath) {
      $folderItems = Get-ChildItem -Path $folderPath -Recurse

      if ($folderItems -eq $null) {
        $folder.Delete()
      } else {
        $folder.Remove()
      }
    }
  }
}