Skip to content

Commit

Permalink
(GH-78) Unpack self should use relative directory
Browse files Browse the repository at this point in the history
Using ApplicationParameters.InstallLocation will use the
global chocolatey install path, which can lead to undesired behavior.
  • Loading branch information
ferventcoder committed Feb 8, 2015
1 parent 4e180cf commit 889906a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void run(ChocolateyConfiguration configuration)
AssemblyFileExtractor.extract_all_resources_to_relative_directory(
_fileSystem,
assembly,
ApplicationParameters.InstallLocation,
_fileSystem.get_directory_name(Assembly.GetExecutingAssembly().Location),
folders,
ApplicationParameters.ChocolateyFileResources,
overwriteExisting: configuration.Force);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static void extract_all_resources_to_relative_directory(IFileSystem fileS
//var fileLocation = fileSystem.combine_paths("", resourceString.ToString().Split('.')) + resourceName.Substring(fileExtensionLocation);

var filePath = fileSystem.combine_paths(directoryPath, fileLocation);
"chocolatey".Log().Debug("Unpacking {0} to '{1}'".format_with(fileLocation,filePath));
extract_binary_file_from_assembly(fileSystem, assembly, resourceName, filePath, overwriteExisting);
}
}
Expand Down

0 comments on commit 889906a

Please sign in to comment.