aboutsummaryrefslogtreecommitdiff
path: root/src/StringUtil.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-27 12:46:28 (GMT)
committerfluxgen <fluxgen>2002-01-27 12:46:28 (GMT)
commit1aa01577abf19c6073e9599fdddb13596360fa3a (patch)
treeb0e10de994293df7b72301b471ac13a22f759f60 /src/StringUtil.cc
parented2da1f1418763b3a6fe259928639d15ffe7eda2 (diff)
downloadfluxbox-1aa01577abf19c6073e9599fdddb13596360fa3a.zip
fluxbox-1aa01577abf19c6073e9599fdddb13596360fa3a.tar.bz2
fixed small bug in expandFilename
Diffstat (limited to 'src/StringUtil.cc')
-rw-r--r--src/StringUtil.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringUtil.cc b/src/StringUtil.cc
index ba5f58d..a85735a 100644
--- a/src/StringUtil.cc
+++ b/src/StringUtil.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: StringUtil.cc,v 1.6 2002/01/21 01:56:39 fluxgen Exp $ 22// $Id: StringUtil.cc,v 1.7 2002/01/27 12:46:28 fluxgen Exp $
23 23
24#include "StringUtil.hh" 24#include "StringUtil.hh"
25 25
@@ -67,7 +67,7 @@ char *StringUtil::expandFilename(const char *filename) {
67 67
68 auto_ptr<char> retval( new char[strlen(filename)+strlen(getenv("HOME"))+2]); 68 auto_ptr<char> retval( new char[strlen(filename)+strlen(getenv("HOME"))+2]);
69 if (filename[0]=='~') { 69 if (filename[0]=='~') {
70 strcat(retval.get(), getenv("HOME")); 70 strcpy(retval.get(), getenv("HOME"));
71 strcat(retval.get(), &filename[1]); 71 strcat(retval.get(), &filename[1]);
72 } else 72 } else
73 return StringUtil::strdup(filename); //return unmodified value 73 return StringUtil::strdup(filename); //return unmodified value