Kaydet (Commit) 6151c6f4 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#735300-1 Unchecked return value

Change-Id: I9cb69643ba43adc76ef38db61da2b7c1c3d3e3c1
üst b89311b9
......@@ -1030,18 +1030,28 @@ bool MozPluginTabPage::installPlugin()
#ifdef UNIX
// get the real file referred by .so lnk file
char* pHome = getpwuid(getuid())->pw_dir;
if(!pHome)
{
return false;
}
OString lnkFilePath(OString(pHome) + OString("/.mozilla/plugins/libnpsoplugin" SAL_DLLEXTENSION));
remove(lnkFilePath.getStr());
(void)remove(lnkFilePath.getStr());
// create the dirs if necessary
struct stat buf;
char tmpDir[NPP_PATH_MAX] = {0};
sprintf(tmpDir, "%s/.mozilla", pHome);
snprintf(tmpDir, NPP_PATH_MAX, "%s/.mozilla", pHome);
if (0 > stat(lnkFilePath.getStr(), &buf))
{
mkdir(tmpDir, 0755);
if(mkdir(tmpDir, 0755))
{
return false;
}
strcat(tmpDir, "/plugins");
mkdir(tmpDir, 0755);
if(mkdir(tmpDir, 0755))
{
return false;
}
}
// get the real file path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment