Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Unified Diff: base/base_paths_win.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base_paths_mac.mm ('k') | base/base_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_win.cc
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
index 4ecb59d4dec1f5cdd64e3c61abaa72227676bad2..58f925f7e1f69d06529a1f7489faea656ce7285b 100644
--- a/base/base_paths_win.cc
+++ b/base/base_paths_win.cc
@@ -32,14 +32,16 @@ bool PathProviderWin(int key, FilePath* result) {
FilePath cur;
switch (key) {
case base::FILE_EXE:
- GetModuleFileName(NULL, system_buffer, MAX_PATH);
+ if (GetModuleFileName(NULL, system_buffer, MAX_PATH) == 0)
+ return false;
cur = FilePath(system_buffer);
break;
case base::FILE_MODULE: {
// the resource containing module is assumed to be the one that
// this code lives in, whether that's a dll or exe
HMODULE this_module = reinterpret_cast<HMODULE>(&__ImageBase);
- GetModuleFileName(this_module, system_buffer, MAX_PATH);
+ if (GetModuleFileName(this_module, system_buffer, MAX_PATH) == 0)
+ return false;
cur = FilePath(system_buffer);
break;
}
« no previous file with comments | « base/base_paths_mac.mm ('k') | base/base_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698