projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c75baa
)
Do not create the folder passed to app.setPath
author
Cheng Zhao
<zcbenz@gmail.com>
Thu, 21 Apr 2016 05:37:29 +0000
(14:37 +0900)
committer
Cheng Zhao
<zcbenz@gmail.com>
Thu, 21 Apr 2016 05:37:29 +0000
(14:37 +0900)
atom/browser/api/atom_api_app.cc
patch
|
blob
|
history
diff --git
a/atom/browser/api/atom_api_app.cc
b/atom/browser/api/atom_api_app.cc
index
9d0aa79
..
d239a63
100644
(file)
--- a/
atom/browser/api/atom_api_app.cc
+++ b/
atom/browser/api/atom_api_app.cc
@@
-351,10
+351,15
@@
base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
void App::SetPath(mate::Arguments* args,
const std::string& name,
const base::FilePath& path) {
+ if (!path.IsAbsolute()) {
+ args->ThrowError("path must be absolute");
+ return;
+ }
+
bool succeed = false;
int key = GetPathConstant(name);
if (key >= 0)
- succeed = PathService::Override
(key, path
);
+ succeed = PathService::Override
AndCreateIfNeeded(key, path, true, false
);
if (!succeed)
args->ThrowError("Failed to set path");
}