vtablefactory.cxx (61dff127) | vtablefactory.cxx (0848378b) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 241 unchanged lines hidden (view full) --- 250 block.fd = -1; 251 252 osl::Security aSecurity; 253 rtl::OUString strDirectory; 254 rtl::OUString strURLDirectory; 255 if (aSecurity.getHomeDir(strURLDirectory)) 256 osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory); 257 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 241 unchanged lines hidden (view full) --- 250 block.fd = -1; 251 252 osl::Security aSecurity; 253 rtl::OUString strDirectory; 254 rtl::OUString strURLDirectory; 255 if (aSecurity.getHomeDir(strURLDirectory)) 256 osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory); 257 |
258 for (int i = strDirectory.getLength() == 0 ? 1 : 0; i < 2; ++i) | 258 for (int i = strDirectory.isEmpty() ? 1 : 0; i < 2; ++i) |
259 { | 259 { |
260 if (!strDirectory.getLength()) | 260 if (strDirectory.isEmpty()) |
261 strDirectory = rtl::OUString::createFromAscii("/tmp"); 262 263 strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX"); 264 rtl::OString aTmpName = rtl::OUStringToOString(strDirectory, osl_getThreadTextEncoding()); 265 char *tmpfname = new char[aTmpName.getLength()+1]; 266 strncpy(tmpfname, aTmpName.getStr(), aTmpName.getLength()+1); 267 if ((block.fd = mkstemp(tmpfname)) == -1) 268 perror("creation of executable memory area failed"); --- 110 unchanged lines hidden --- | 261 strDirectory = rtl::OUString::createFromAscii("/tmp"); 262 263 strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX"); 264 rtl::OString aTmpName = rtl::OUStringToOString(strDirectory, osl_getThreadTextEncoding()); 265 char *tmpfname = new char[aTmpName.getLength()+1]; 266 strncpy(tmpfname, aTmpName.getStr(), aTmpName.getLength()+1); 267 if ((block.fd = mkstemp(tmpfname)) == -1) 268 perror("creation of executable memory area failed"); --- 110 unchanged lines hidden --- |