summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-01-16 09:40:10 -0500
committerJules Laplace <jules@okfoc.us>2015-01-16 09:40:10 -0500
commitd1db4ecc9ace480709b84f9b6f0cf64148a8fc9a (patch)
tree26e72794a5322d10ec32fa0818172064d6e6eb68
parentfb5aa9f1050543006a3f840f987a0f60da31ed27 (diff)
substr
-rwxr-xr-xxdcc.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/xdcc.pl b/xdcc.pl
index 5ba18f2..9140ee5 100755
--- a/xdcc.pl
+++ b/xdcc.pl
@@ -187,7 +187,7 @@ sub xdcc_report {
}
sub xdcc_add {
my ($path, $desc) = @_;
- if ($path[0] == "~") {
+ if (substr($path, 0, 1) eq "~") {
$path =~ s/^~//;
$path = $ENV{"HOME"} . $path;
}