Skip to content

Commit

Permalink
Unify trailing spaces / new lines (flutter#5871)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuqian authored Jul 26, 2018
1 parent 6193743 commit aef291b
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions fml/platform/win/paths_win.cc
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/fml/paths.h"

#include <windows.h>

#include "lib/fxl/files/path.h"

namespace fml {
namespace paths {

std::pair<bool, std::string> GetExecutableDirectoryPath() {
HMODULE module = GetModuleHandle(NULL);
if (module == NULL) {
return {false, ""};
}
char path[MAX_PATH];
DWORD read_size = GetModuleFileNameA(module, path, MAX_PATH);
if (read_size == 0 || read_size == MAX_PATH) {
return {false, ""};
}
return {true, files::GetDirectoryName(std::string{path, read_size})};
}

} // namespace paths
} // namespace fml
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/fml/paths.h"

#include <windows.h>

#include "lib/fxl/files/path.h"

namespace fml {
namespace paths {

std::pair<bool, std::string> GetExecutableDirectoryPath() {
HMODULE module = GetModuleHandle(NULL);
if (module == NULL) {
return {false, ""};
}
char path[MAX_PATH];
DWORD read_size = GetModuleFileNameA(module, path, MAX_PATH);
if (read_size == 0 || read_size == MAX_PATH) {
return {false, ""};
}
return {true, files::GetDirectoryName(std::string{path, read_size})};
}

} // namespace paths
} // namespace fml

0 comments on commit aef291b

Please sign in to comment.