diff options
author | anbr <vdr07@deltab.de> | 2010-12-21 20:57:28 +0100 |
---|---|---|
committer | anbr <vdr07@deltab.de> | 2010-12-21 20:57:28 +0100 |
commit | 3837f9ab492bcb791d278908cc2e7e4dc9a12217 (patch) | |
tree | 106f1089da730c02a8c5f27e1b21f9767fc3d66a /tools.h | |
parent | 2906f2d1b7e1c5931b3d05156569d6061eb6b9b5 (diff) | |
download | vdr-plugin-dvdswitch-3837f9ab492bcb791d278908cc2e7e4dc9a12217.tar.gz vdr-plugin-dvdswitch-3837f9ab492bcb791d278908cc2e7e4dc9a12217.tar.bz2 |
release 0.1.5 from http://www.vdr-portal.de/board/thread.php?postid=845575#post8455750.1.5
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -46,8 +46,9 @@ class cFileDelThread : public cThread Ok = true; if(file) { - asprintf(&File, "%s.sdel", file); - cFileCMD::Rn(file, File); + if(0 < asprintf(&File, "%s.sdel", file)) { + cFileCMD::Rn(file, File); + } } } } @@ -80,9 +81,10 @@ class cFileMoveThread : public cThread if(FileName && File && Dest) { char *buffer = NULL; - asprintf(&buffer, "%s/%s", Dest, FileName); - cFileCMD::Rn(File, buffer); - free(buffer); + if(0 < asprintf(&buffer, "%s/%s", Dest, FileName)) { + cFileCMD::Rn(File, buffer); + free(buffer); + } } delete(this); }; @@ -104,8 +106,9 @@ class cFileMoveThread : public cThread cFileInfo *info = new cFileInfo(file); FileName = strdup(info->FileName()); DELETENULL(info); - asprintf(&File, "%s.smove", file); - cFileCMD::Rn(file, File); + if(0 < asprintf(&File, "%s.smove", file)) { + cFileCMD::Rn(file, File); + } } Dest = dest ? strdup(dest) : NULL; } |