OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "app/win_util.h" |
| 6 |
| 7 namespace win_util { |
| 8 |
| 9 bool ConvertToLongPath(const std::wstring& short_path, |
| 10 std::wstring* long_path) { |
| 11 wchar_t long_path_buf[MAX_PATH]; |
| 12 DWORD return_value = GetLongPathName(short_path.c_str(), long_path_buf, |
| 13 MAX_PATH); |
| 14 if (return_value != 0 && return_value < MAX_PATH) { |
| 15 *long_path = long_path_buf; |
| 16 return true; |
| 17 } |
| 18 |
| 19 return false; |
| 20 } |
| 21 |
| 22 } // namespace win_util |
OLD | NEW |