summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2001-12-14 17:39:29 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2001-12-14 17:39:29 +0000
commite7b77c31c89e55607310b0bd50f93a2d21bfa4a9 (patch)
tree94a8924cef9511e63de99e51ca35a63483378c6d /src
parent5ca8027725acbab6af7384b1b11d76b9a06ce168 (diff)
downloadxine-lib-e7b77c31c89e55607310b0bd50f93a2d21bfa4a9.tar.gz
xine-lib-e7b77c31c89e55607310b0bd50f93a2d21bfa4a9.tar.bz2
$PWD is not available with all shells, use getcwd() to get the current
directory. Fixes a problem under solaris with a non working file browser, when xine is started using a CDE action. CVS patchset: 1245 CVS date: 2001/12/14 17:39:29
Diffstat (limited to 'src')
-rw-r--r--src/input/input_file.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 4a8df8362..c34a54df4 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_file.c,v 1.33 2001/12/14 15:26:47 f1rmb Exp $
+ * $Id: input_file.c,v 1.34 2001/12/14 17:39:29 jkeil Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -839,13 +839,10 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->mrls_allocated_entries = 0;
{
- char *pwd;
char current_dir[PATH_MAX + 1];
- if((pwd = getenv("PWD")) == NULL)
- snprintf(current_dir, 1, "%s", ".");
- else
- snprintf(current_dir, PATH_MAX, "%s", pwd);
+ if(getcwd(current_dir, sizeof(current_dir)) == NULL)
+ strcpy(current_dir, ".");
this->origin_path = config->register_string(this->config, "input.file_origin_path",
current_dir, "origin path to grab file mrls",