Changeset 47 in flacrip


Ignore:
Timestamp:
03/17/16 17:43:05 (8 years ago)
Author:
peter
Message:

flactrack: if the output directory exists abort unless the --force flag is given

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/flactrack

    r30 r47  
    2828    'ascii-tags' => \my $ASCII_TAGS, 
    2929    'tags!' => \$TAGS, 
     30    'force' => \my $FORCE, 
    3031); 
    3132 
     
    6768    } 
    6869    $DIRECTORY = catfile($base_dir, $album_dir); 
     70    if (-e $DIRECTORY and not $FORCE) { 
     71        die "$DIRECTORY already exists, skipping. (Use --force to overwrite)\n"; 
     72    } 
    6973    #die $DIRECTORY; 
    7074} 
Note: See TracChangeset for help on using the changeset viewer.