Skip to content

Commit

Permalink
path
Browse files Browse the repository at this point in the history
  • Loading branch information
starlying committed Apr 28, 2019
1 parent 31ba1d3 commit 26ee807
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SiteServer.CMS/Packaging/PackageUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public static void DownloadPackage(string packageId, string version)
}
}

var directoryNames = DirectoryUtils.GetDirectoryNames(directoryPath);
var directoryNames = DirectoryUtils.GetDirectoryNames(packagesPath);
foreach (var directoryName in directoryNames)
{
if (StringUtils.StartsWithIgnoreCase(directoryName, $"{packageId}."))
{
DirectoryUtils.DeleteDirectoryIfExists(PathUtils.Combine(directoryPath, directoryName));
DirectoryUtils.DeleteDirectoryIfExists(PathUtils.Combine(packagesPath, directoryName));
}
}

Expand Down
4 changes: 3 additions & 1 deletion SiteServer.Utils/PathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ public static string GetPluginDllDirectoryPath(string pluginId)

public static string GetPackagesPath(params string[] paths)
{
return GetSiteFilesPath(DirectoryUtils.SiteFiles.Packages, Combine(paths));
var packagesPath = GetSiteFilesPath(DirectoryUtils.SiteFiles.Packages, Combine(paths));
DirectoryUtils.CreateDirectoryIfNotExists(packagesPath);
return packagesPath;
}

public static string RemovePathInvalidChar(string filePath)
Expand Down

0 comments on commit 26ee807

Please sign in to comment.