Skip to content

Commit

Permalink
2.1 (20091105)
Browse files Browse the repository at this point in the history
    - Only put quotes around src glob when it contains a space
  • Loading branch information
raforg committed Nov 5, 2009
1 parent 49d69a9 commit f298114
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ bindir := $(prefix)/bin
mandir := $(shell [ -d $(prefix)/share/man ] && echo $(prefix)/share/man || echo $(prefix)/man)

name := mved
version := 2.0
date := 20080307
version := 2.1
date := 20091105

install:
@set -e; \
Expand Down
17 changes: 13 additions & 4 deletions mved
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;

# mved - carefully rename multiple files
#
# Copyright (C) 1997-2008 raf <[email protected]>
# Copyright (C) 1997-2009 raf <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -21,7 +21,7 @@ use strict;
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# or visit http://www.gnu.org/copyleft/gpl.html
#
# 20080307 raf <[email protected]>
# 20091105 raf <[email protected]>

=head1 NAME

Expand Down Expand Up @@ -215,7 +215,7 @@ I<link(2)>, I<unlink(2)>, I<mv(1)>, I<rm(1)>

=head1 AUTHOR

20080307 raf <[email protected]>
20091105 raf <[email protected]>

=head1 URL

Expand Down Expand Up @@ -287,7 +287,16 @@ print "$name: src glob <$src_glob> dst glob <$dst_glob>\n" if $debug;
# Construct a glob and get the list of matching files

$src_glob =~ s/=/*/g;
my @src = glob '"' . $src_glob . '"';
my @src;
if ($src_glob =~ / /)
{
@src = glob '"' . $src_glob . '"';
}
else
{
@src = glob $src_glob;
}
#my @src = glob $src_glob;
die "$name: No such file: $src_glob\n" unless @src;

# Translate src into a regular expression search
Expand Down

0 comments on commit f298114

Please sign in to comment.