Skip to content
Browse files

Merge pull request #6 from csslayer/master

don't fails to start if sunpinyin cannot create user configuration.
  • Loading branch information...
2 parents 0725a25 + 3e94944 commit f563d9da8d971c9abb2a2b6e5e2ab17193aaf44c @yongsun yongsun committed Aug 11, 2011
Showing with 2 additions and 6 deletions.
  1. +1 −1 src/ime-core/ic_history.cpp
  2. +1 −1 src/ime-core/imi_options.cpp
  3. +0 −4 src/ime-core/userdict.cpp
View
2 src/ime-core/ic_history.cpp
@@ -182,7 +182,7 @@ CBigramHistory::loadFromFile(const char *fname)
bool suc = false;
int fd = open(fname, O_CREAT, 0600);
if (fd == -1) {
- perror("fopen bi-gram");
+ suc = loadFromBuffer(NULL, 0);
return suc;
}
View
2 src/ime-core/imi_options.cpp
@@ -83,7 +83,7 @@ CSimplifiedChinesePolicy::loadResources()
}
char * tmp = strdup(m_user_data_dir.c_str());
- suc &= createDirectory(tmp);
+ createDirectory(tmp);
free(tmp);
std::string history_path = m_user_data_dir + "/history";
View
4 src/ime-core/userdict.cpp
@@ -52,10 +52,6 @@ CUserDict::load(const char *fname)
m_fname = strdup(fname);
rc = _copyDb(Load);
- if (rc != SQLITE_OK) {
- sqlite3_close(m_db);
- return false;
- }
return _createTable() && _createIndexes();
}

0 comments on commit f563d9d

Please sign in to comment.
Something went wrong with that request. Please try again.