PikminGuts92/Mackiloha

arkhelper doesn't accept relative path on Linux

mtolly opened this issue · 1 comments

While working on dtab I tested the new Linux build of arkhelper with it. If I'm in a gen folder and I give the .hdr as a relative path, I get this:

$ arkhelper ark2dir -s main_xbox.hdr out
Using dtab in Path environment variable
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/main_xbox_1.ark'.
File name: '/main_xbox_1.ark'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream.OpenHandle(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.OpenRead(String path)
   at Mackiloha.Ark.ArkFile.GetArkEntryBytes(ArkEntry entry)
   at Mackiloha.Ark.Archive.GetArkEntryFileStream(ArkEntry entry)
   at ArkHelper.Apps.Ark2DirApp.ExtractEntry(Archive ark, ArkEntry entry, String filePath)
   at ArkHelper.Apps.Ark2DirApp.Parse(Ark2DirOptions op)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at ArkHelper.Program.Main(String[] args)
fish: “~/Downloads/Mackiloha_v0.0.117-…” terminated by signal SIGABRT (Abort)

But if I run arkhelper ark2dir -s $(pwd)/main_xbox.hdr out it works fine.

I thought I had already fixed this issue but apparently that was only for ark versions 4 and below. This latest commit (a2e68f6) should fix versions 5 and above. It's part of build v0.0.118.