Diff for /loncom/publisher/loncfile.pm between versions 1.52 and 1.54

version 1.52, 2004/03/02 16:48:27 version 1.54, 2004/05/26 22:15:19
Line 426  sub Rename1 { Line 426  sub Rename1 {
     #renaming a dir, delete the trailing /      #renaming a dir, delete the trailing /
             #remove second to last element for current dir              #remove second to last element for current dir
     if (-d $fn) {      if (-d $fn) {
    $newfilename=~/\.(\w+)$/;
    if (&Apache::loncommon::fileembstyle($1) eq 'ssi') {
       $request->print('<br /><font color="red">'.
    &mt('Cannot change MIME type of a directory').
       '</font>'.
    '<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>');
       return;
    }
  $newfilename=~s/\/[^\/]+\/([^\/]+)$/\/$1/;   $newfilename=~s/\/[^\/]+\/([^\/]+)$/\/$1/;
     }      }
     $newfilename=~s://+:/:g; # remove duplicate /      $newfilename=~s://+:/:g; # remove duplicate /
Line 1072  sub phasetwo { Line 1080  sub phasetwo {
     if ($fn=~m:(.*)/([^/]+):) {      if ($fn=~m:(.*)/([^/]+):) {
  $dir=$1; # Directory path   $dir=$1; # Directory path
  $main=$2; # Filename.   $main=$2; # Filename.
  }      }
  if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions      if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions
  $main=$`; #This is what is before the match (.) so it's just the main filename, yea it's nasty   $main=$`; #This is what is before the match (.) so it's just the main filename, yea it's nasty
  $suffix=$1; #This is the actually filename extension if it exists   $suffix=$1; #This is the actually filename extension if it exists
  }      }
     my $dest;                   # On success this is where we'll go.      my $dest;                   # On success this is where we'll go.
           
     &Debug($r,       &Debug($r, 

Removed from v.1.52  
changed lines
  Added in v.1.54


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>