[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] [PATCH] option umask for tag value-extended
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Mike Heins (mikeh@minivend.com):
> The auto-directory would be something like:
>
> if (ref $opt and $opt->{auto_create_dir}) {
> my $dir = $file;
> $dir =~ s/>+//;
>
> ## This is not available via normal tags, so may not be needed
> if ($Global::NoAbsolute and file_name_is_absolute($dir) ) {
> ::logGlobal("NoAbsolute error: create file $dir");
> return undef;
> }
>
> ## Need to make this OS-independent, requires File::Spec support
Obvious bug:
> $dir =~ s:.*/:: or $dir = '';
should be:
$dir =~ s/\n//g; # Just in case
$dir =~ s:(.*)/.*:$1: or $dir = '';
> if($dir and ! -d $dir) {
> File::Path::mkpath($dir);
> }
> }
--
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>
Friends don't let friends use Outlook. -- Bob Blaylock
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list