[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libbase rc.cpp rc.h [release_0_8_1]
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash/libbase rc.cpp rc.h [release_0_8_1] |
Date: |
Mon, 20 Aug 2007 23:19:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: release_0_8_1
Changes by: Sandro Santilli <strk> 07/08/20 23:19:44
Modified files:
libbase : rc.cpp rc.h
Log message:
Patch by Benjamin Wolsey <address@hidden>:
* 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/libbase/rc.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.27.2.2&r2=1.27.2.3
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.21.2.2&r2=1.21.2.3
Patches:
Index: rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.27.2.2
retrieving revision 1.27.2.3
diff -u -b -r1.27.2.2 -r1.27.2.3
--- rc.cpp 20 Aug 2007 18:09:28 -0000 1.27.2.2
+++ rc.cpp 20 Aug 2007 23:19:44 -0000 1.27.2.3
@@ -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: rc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.h,v
retrieving revision 1.21.2.2
retrieving revision 1.21.2.3
diff -u -b -r1.21.2.2 -r1.21.2.3
--- rc.h 20 Aug 2007 18:09:29 -0000 1.21.2.2
+++ rc.h 20 Aug 2007 23:19:44 -0000 1.21.2.3
@@ -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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/libbase rc.cpp rc.h [release_0_8_1],
Sandro Santilli <=