aianlinb / VisualGGPK2

Library for Content.ggpk of PathOfExile (Rewrite of libggpk)
GNU Affero General Public License v3.0
159 stars 32 forks source link

Access denied when selecting Content.ggpk #15

Closed Ragulab closed 3 years ago

Ragulab commented 3 years ago

When running VisualGGPK2.exe and choosing the Content.ggpk i immediately get the following error:

System.UnauthorizedAccessException: Access to the path 'D:\LibGGPK2_v0.11.4\Content.ggpk' is denied.
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
   at LibGGPK2.GGPKContainer..ctor(String path, Boolean BundleMode, Boolean SteamMode, Boolean BuildTree) in D:\GitHub\LibGGPK2\LibGGPK2\GGPKContainer.cs:line 63
   at VisualGGPK2.MainWindow.<OnLoaded>b__13_0() in D:\GitHub\LibGGPK2\VisualGGPK2\MainWindow.xaml.cs:line 99
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at VisualGGPK2.MainWindow.OnLoaded(Object sender, RoutedEventArgs e) in D:\GitHub\LibGGPK2\VisualGGPK2\MainWindow.xaml.cs:line 99
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

The error occurs on C:\ and D:\ Drive. The error occurs on C:\VisualGGPK\ and C:\Users\Admin\Downloads The error occurs when running as administrator and without administrator rights.

Version: Pre-Release v0.11.4

aianlinb commented 3 years ago

Did you check whether your GGPK is read-only or the game is opened?

Ragulab commented 3 years ago

Ohhhh.. The GGPK was in read-only mode. Didn't know it was a thing. Thanks :) Anyways i'd still suggest to add a list of possible solutions to the error message in the future, but for now the issue is closed