From 485629c325542b9301b7c939d199b04e8eb9274f Mon Sep 17 00:00:00 2001 From: crutchy- Date: Fri, 12 Dec 2014 08:32:26 +1100 Subject: [PATCH] whatever i changed --- scripts/execfs.php | 1 + scripts/execfs_lib.php | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/execfs.php b/scripts/execfs.php index fd89338..721c25b 100644 --- a/scripts/execfs.php +++ b/scripts/execfs.php @@ -60,6 +60,7 @@ break; case "~ls": # ~ls %path% + execfs_ls(); break; case "~cd": # ~cd %path% diff --git a/scripts/execfs_lib.php b/scripts/execfs_lib.php index 73a10c4..9f1f8ec 100644 --- a/scripts/execfs_lib.php +++ b/scripts/execfs_lib.php @@ -47,7 +47,19 @@ function set_fs() function get_path(&$directory) { - + global $false; + $result=$directory["name"]; + $parent=$directory["parent"]; + while ($parent<>$false) + { + if ($parent["name"]<>PATH_DELIM) + { + $result=PATH_DELIM.$result; + } + $result=$parent["name"].$result; + $parent=$parent["parent"]; + } + return $result; } ##################################################################################################### @@ -150,7 +162,7 @@ function execfs_set($nick,$name,$value) global $fs; global $false; # create path as required - #$path=get_current_path($nick); + #$path=get_current_directory($nick); $directory=&set_directory("/Level1/Level2/Level3"); if ($directory==$false) { @@ -192,6 +204,9 @@ function execfs_rm() function execfs_ls() { global $fs; + $directory=&get_directory("/Level1/Level2/Level3/Level4"); + $path=get_path($directory); + privmsg($path); } #####################################################################################################