author | erik <erik> | 2007-01-19 01:18:01 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-19 01:18:01 (UTC) |
commit | 32343107b30904806d02672955c57ed53d39fe79 (patch) (unidiff) | |
tree | 9114a0ea170e3adc807a2445b49360f1bfde9626 /libopie2/opiecore/oglobal.cpp | |
parent | ac0ce844e90a64247c0adb210e0a23021b011d57 (diff) | |
download | opie-32343107b30904806d02672955c57ed53d39fe79.zip opie-32343107b30904806d02672955c57ed53d39fe79.tar.gz opie-32343107b30904806d02672955c57ed53d39fe79.tar.bz2 |
Every file in this commit has a change to check the return value of a call.
-rw-r--r-- | libopie2/opiecore/oglobal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp index 706ac6c..b7d59fc 100644 --- a/libopie2/opiecore/oglobal.cpp +++ b/libopie2/opiecore/oglobal.cpp | |||
@@ -335,25 +335,25 @@ bool OGlobal::isAppLnkFileName( const QString& str ) | |||
335 | */ | 335 | */ |
336 | bool OGlobal::isDocumentFileName( const QString& file ) | 336 | bool OGlobal::isDocumentFileName( const QString& file ) |
337 | { | 337 | { |
338 | if (file.isEmpty()||file.at(file.length()-1)==QDir::separator()) return false; | 338 | if (file.isEmpty()||file.at(file.length()-1)==QDir::separator()) return false; |
339 | if (file.startsWith(QPEApplication::documentDir()+QDir::separator())) return true; | 339 | if (file.startsWith(QPEApplication::documentDir()+QDir::separator())) return true; |
340 | StorageInfo si; | 340 | StorageInfo si; |
341 | QList< FileSystem > fl = si.fileSystems(); | 341 | QList< FileSystem > fl = si.fileSystems(); |
342 | FileSystem*fs; | 342 | FileSystem*fs; |
343 | for (fs = fl.first();fs!=0;fs=fl.next()) { | 343 | for (fs = fl.first();fs!=0;fs=fl.next()) { |
344 | if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) | 344 | if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) |
345 | return true; | 345 | return true; |
346 | } | 346 | } |
347 | if (file.startsWith(homeDirPath())+"/Documents/") return true; | 347 | if (file.startsWith(homeDirPath()+"/Documents/")) return true; |
348 | return false; | 348 | return false; |
349 | } | 349 | } |
350 | 350 | ||
351 | QString OGlobal::tempDirPath() | 351 | QString OGlobal::tempDirPath() |
352 | { | 352 | { |
353 | static QString defstring="/tmp"; | 353 | static QString defstring="/tmp"; |
354 | char * tmpp = 0; | 354 | char * tmpp = 0; |
355 | if ( (tmpp=getenv("TEMP"))) { | 355 | if ( (tmpp=getenv("TEMP"))) { |
356 | return tmpp; | 356 | return tmpp; |
357 | } | 357 | } |
358 | return defstring; | 358 | return defstring; |
359 | } | 359 | } |