summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-01-16 09:39:05 -0500
committerJules Laplace <jules@okfoc.us>2015-01-16 09:39:05 -0500
commitfb5aa9f1050543006a3f840f987a0f60da31ed27 (patch)
tree70290ec7b357a04df39527e51a085d5e119253a1
parent0adfe51141855502d699fde17c6ba91fd0fffe95 (diff)
fix path
-rwxr-xr-xxdcc.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/xdcc.pl b/xdcc.pl
index 9d6717d..5ba18f2 100755
--- a/xdcc.pl
+++ b/xdcc.pl
@@ -187,6 +187,10 @@ sub xdcc_report {
}
sub xdcc_add {
my ($path, $desc) = @_;
+ if ($path[0] == "~") {
+ $path =~ s/^~//;
+ $path = $ENV{"HOME"} . $path;
+ }
if (! -e $path) {
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'xdcc_file_not_found');
return;