CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/08/20 22:59:26
Modified files: . : ChangeLog libbase : rc.cpp rc.h Log message: Patch by Benjamin Wolsey <[EMAIL PROTECTED]>: * libbase/rc.{cpp,h}: Fixes a typo, matches the whole username if there's no slash (following POSIX) and makes expandPath (not expandTilde) private. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4047&r2=1.4048 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.29&r2=1.30 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&r1=1.23&r2=1.24 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4047 retrieving revision 1.4048 diff -u -b -r1.4047 -r1.4048 --- ChangeLog 20 Aug 2007 17:48:09 -0000 1.4047 +++ ChangeLog 20 Aug 2007 22:59:25 -0000 1.4048 @@ -1,3 +1,9 @@ +2007-08-21 Benjamin Wolsey <[EMAIL PROTECTED]> + + * libbase/rc.{cpp,h}: Fixes a typo, matches the whole username if + there's no slash (following POSIX) and makes expandPath + (not expandTilde) private. + 2007-08-20 Benjamin Wolsey <[EMAIL PROTECTED]> * configure.ac: look for the pwd.h header Index: libbase/rc.cpp =================================================================== RCS file: /sources/gnash/gnash/libbase/rc.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- libbase/rc.cpp 20 Aug 2007 17:48:09 -0000 1.29 +++ libbase/rc.cpp 20 Aug 2007 22:59:26 -0000 1.30 @@ -149,7 +149,7 @@ } string -RcInitFile::expandTilde (std::string& unixpath) +RcInitFile::expandPath (std::string& unixpath) { string _expanded; @@ -157,7 +157,7 @@ //Only if path starts with "~" if (unixpath.substr(0,1) == "~") { const char *home = getenv("HOME"); - if (unixpath.substr(1,2) == "/") { + if (unixpath.substr(1,1) == "/") { // Initial "~" followed by "/" if (home) { // if HOME set in env, replace ~ with HOME @@ -181,7 +181,7 @@ if (first_slash != string::npos) { // everything between initial ~ and / user = unixpath.substr(1, first_slash - 1 ); - } + } else user = unixpath.substr(1); //find user using pwd struct passwd *password = getpwnam(user.c_str()); @@ -276,7 +276,7 @@ if (variable == "debuglog") { #ifdef HAVE_PWD_H - _log = expandTilde (value); + _log = expandPath (value); #else //For non-UNIX systems _log = value; Index: libbase/rc.h =================================================================== RCS file: /sources/gnash/gnash/libbase/rc.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- libbase/rc.h 20 Aug 2007 17:48:09 -0000 1.23 +++ libbase/rc.h 20 Aug 2007 22:59:26 -0000 1.24 @@ -102,8 +102,6 @@ static int extractNumber(int *num, const char *pattern, std::string &variable, std::string &value); - static std::string expandTilde(std::string& unixpath); - const std::vector<std::string>& getWhiteList() const { return _whitelist; } const std::vector<std::string>& getBlackList() const { return _blacklist; } @@ -156,6 +154,9 @@ bool _extensionsEnabled; // wheter to scan plugin path for extensions bool _startStopped; // whether to start the gui in "stop" mode + + static std::string expandPath(std::string& unixpath); + }; //extern DSOEXPORT RcInitFile rcfile; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit