diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Commands/CommandObjectBugreport.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Notes
Diffstat (limited to 'source/Commands/CommandObjectBugreport.cpp')
| -rw-r--r-- | source/Commands/CommandObjectBugreport.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/Commands/CommandObjectBugreport.cpp b/source/Commands/CommandObjectBugreport.cpp index 7ba8ab945eae..dc4b9ef302c0 100644 --- a/source/Commands/CommandObjectBugreport.cpp +++ b/source/Commands/CommandObjectBugreport.cpp @@ -9,13 +9,9 @@ #include "CommandObjectBugreport.h" -// C Includes #include <cstdio> -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/OptionGroupOutputFile.h" @@ -72,8 +68,6 @@ protected: const FileSpec &outfile_spec = m_outfile_options.GetFile().GetCurrentValue(); if (outfile_spec) { - char path[PATH_MAX]; - outfile_spec.GetPath(path, sizeof(path)); uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate | @@ -84,10 +78,13 @@ protected: open_options |= File::eOpenOptionTruncate; StreamFileSP outfile_stream = std::make_shared<StreamFile>(); - Status error = outfile_stream->GetFile().Open(path, open_options); + File &file = outfile_stream->GetFile(); + Status error = + FileSystem::Instance().Open(file, outfile_spec, open_options); if (error.Fail()) { + auto path = outfile_spec.GetPath(); result.AppendErrorWithFormat("Failed to open file '%s' for %s: %s\n", - path, append ? "append" : "write", + path.c_str(), append ? "append" : "write", error.AsCString()); result.SetStatus(eReturnStatusFailed); return false; |
