diff options
author | Jonas Smedegaard <dr@jones.dk> | 2009-08-08 12:41:29 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2009-08-08 12:41:29 +0200 |
commit | 9add3d3d23a38ce3b0a5f3ede07580d76b040a2c (patch) | |
tree | 2de4bb5ef6e6ad0e2c315cf8119427705abace27 | |
parent | 6fba03979143ba544f81302fce0e18865af59759 (diff) |
Fix setting path to Markdown files.
-rwxr-xr-x | localmarkdown2sms | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms index 3e42e05..54e3cc9 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -21,6 +21,7 @@ use strict; +use File::Spec; use File::Slurp; use Time::Duration::Parse; #use Proc::Daemon; @@ -35,7 +36,7 @@ my ($path) = shift @ARGV; foreach my $file (read_dir( $path )) { my ($key, $i); next unless ($file =~ /\.mdwn$/); - foreach my $line (read_file( '$path/' . $file )) { + foreach my $line (read_file( File::Spec->catfile($path, $file))) { chomp $line; my $content; # headline |