[Libreoffice-commits] core.git: vcl/generic

Stephan Bergmann sbergman at redhat.com
Thu Oct 8 06:40:07 PDT 2015


 vcl/generic/print/printerjob.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 57cfc82a14f8af97b7c7ae03681457d2491cc8fc
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Oct 8 15:39:39 2015 +0200

    Use OString to dynamically assemble a string
    
    Change-Id: I5ae99bd58217bc8b105abc71286d4036a175cbf2

diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index 221b999..887ca33 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -212,13 +212,7 @@ removeSpoolDir (const OUString& rSpoolDir)
     }
     OString aSysPathByte =
         OUStringToOString (aSysPath, osl_getThreadTextEncoding());
-    sal_Char  pSystem [128];
-    sal_Int32 nChar = 0;
-
-    nChar  = psp::appendStr ("rm -rf ",     pSystem);
-    nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar);
-
-    if (system (pSystem) == -1)
+    if (system (OString("rm -rf " + aSysPathByte).getStr()) == -1)
         OSL_FAIL( "psprint: couldn't remove spool directory" );
 }
 


More information about the Libreoffice-commits mailing list