File tree Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2017 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 " flutter/fml/paths.h"
6
-
7
- #include < windows.h>
8
-
9
- #include " lib/fxl/files/path.h"
10
-
11
- namespace fml {
12
- namespace paths {
13
-
14
- std::pair<bool , std::string> GetExecutableDirectoryPath () {
15
- HMODULE module = GetModuleHandle (NULL );
16
- if (module == NULL ) {
17
- return {false , " " };
18
- }
19
- char path[MAX_PATH];
20
- DWORD read_size = GetModuleFileNameA (module, path, MAX_PATH);
21
- if (read_size == 0 || read_size == MAX_PATH) {
22
- return {false , " " };
23
- }
24
- return {true , files::GetDirectoryName (std::string{path, read_size})};
25
- }
26
-
27
- } // namespace paths
28
- } // namespace fml
1
+ // Copyright 2017 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 " flutter/fml/paths.h"
6
+
7
+ #include < windows.h>
8
+
9
+ #include " lib/fxl/files/path.h"
10
+
11
+ namespace fml {
12
+ namespace paths {
13
+
14
+ std::pair<bool , std::string> GetExecutableDirectoryPath () {
15
+ HMODULE module = GetModuleHandle (NULL );
16
+ if (module == NULL ) {
17
+ return {false , " " };
18
+ }
19
+ char path[MAX_PATH];
20
+ DWORD read_size = GetModuleFileNameA (module, path, MAX_PATH);
21
+ if (read_size == 0 || read_size == MAX_PATH) {
22
+ return {false , " " };
23
+ }
24
+ return {true , files::GetDirectoryName (std::string{path, read_size})};
25
+ }
26
+
27
+ } // namespace paths
28
+ } // namespace fml
You can’t perform that action at this time.
0 commit comments