Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to open a file for which the user does not have read permission throws with non-helpful message #40

Open
SugoiDev opened this issue Apr 5, 2018 · 0 comments

Comments

@SugoiDev
Copy link
Contributor

SugoiDev commented Apr 5, 2018

Using JustAssembly 2018.1.323.2 on win10 x64, if you paste the path of a file the user doesn't have read permissions, the following exception will be thrown

Object reference not set to an instance of an object.
   at Mono.Cecil.Extensions.ModuleDefinitionExtensions.BuildNamespaceHierarchyTree(AssemblyDefinition self) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Cecil.Decompiler\Mono.Cecil.Extensions\ModuleDefinitionExtensions.cs:line 16
   at JustDecompile.Tools.MSBuildProjectBuilder.BaseProjectBuilder..ctor(String assemblyPath, String targetPath, ILanguage language, IFrameworkResolver frameworkResolver, IDecompilationPreferences preferences, IFileGenerationNotifier notifier, IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings, IProjectGenerationNotifier projectNotifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\MSBuildProjectCreator\BaseProjectBuilder.cs:line 150
   at JustDecompile.External.JustAssembly.JustAssemblyProjectBuilder..ctor(String assemblyPath, String targetPath, ILanguage language, IFileGenerationNotifier notifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\JustDecompile.External.JustAssembly\JustAssemblyProjectBuilder.cs:line 23
   at JustDecompile.External.JustAssembly.Decompiler.GenerateFiles(String assemblyFilePath, String targetPath, SupportedLanguage language, CancellationToken cancellationToken, IFileGenerationNotifier notifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\JustDecompile.External.JustAssembly\Decompiler.cs:line 319
   at JustAssembly.Nodes.AssemblyNode.<>c__DisplayClass6.<LoadItemsAsync>b__3() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:line 151

Continuing, the following message will be shown (not very helpful): Not supported file(s):, and a file list will be shown.


I think the security exception should be shown to to the user instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants