dtsession/SmGlobals: unlink mkstemp generated files.
authorJon Trulson <jon@radscan.com>
Sun, 28 Dec 2014 00:24:04 +0000 (17:24 -0700)
committerJon Trulson <jon@radscan.com>
Sun, 28 Dec 2014 00:24:04 +0000 (17:24 -0700)
cde/programs/dtsession/SmGlobals.c

index 16853ef92cef8d0f4c37a8687d309620babccdfd..8a0f68eddc1b700fcf8fbe0e1967b7f19730c6a2 100644 (file)
@@ -1124,6 +1124,8 @@ SetSavePath(
                 else
                   {
                     close(tfd);
+                    unlink(tmpName);
+
                     MoveDirectory(smGD.etcPath, tmpName, False);
                     
                     strncpy(savedTmpDir, tmpName, len - 1);
@@ -1189,6 +1191,8 @@ SetSavePath(
               else
                 {
                   close(tfd);
+                  unlink(tmpName);
+
                   MoveDirectory (smGD.etcPath, tmpName, False);
               
                   strcpy (savedTmpDir, tmpName);