Changeset 240

Show
Ignore:
Timestamp:
06/04/2006 04:00:54 PM
Author:
luedi
Message:

made the item path unique for orphaned items. This will prevent an error if two orphaned files with the same name are found.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk/pin_handler/Vss2Svn/ActionHandler.pm

    r239 r240  
    9797     
    9898    if (!defined $parentphys) { 
    99         $row->{parentphys} = '99999999'; 
     99        # '_' is used as a magic marker for orphaned files 
     100        $row->{parentphys} = '_' . $row->{physname}; 
    100101#        $row->{itemname} = $row->{physname} . '_' . $row->{itemname}; 
    101102        $orphaned = 1; 
     
    426427    $row->{actiontype} = 'MOVE'; 
    427428    $row->{info} = $row->{parentphys}; 
    428     $row->{parentphys} = '99999999'
     429    $row->{parentphys} = '_' . $row->{physname}
    429430    return $self->_move_handler (); 
    430431} 
     
    664665    } 
    665666 
    666     if ($physname eq '99999999') { 
     667    if ($physname =~ m/^_.*/) { 
    667668        # End of recursion; this is the orphaned node 
    668         # todo: we need to make sure, that this is a unique name 
    669         return '/orphaned/'; 
     669        # return the name of the orphaned directory + the name of the orphaned 
     670        # file in order to make the path unique 
     671        return '/orphaned/' . $physname . '/'; 
    670672    } 
    671673 
     
    796798    } 
    797799 
    798     if ($physname eq '99999999') { 
     800    if ($physname =~ m/^_.*/) { 
    799801        # End of recursion; this is the orphaned node 
    800         # todo: we need to make sure, that this is a unique name 
    801         return ['/orphaned/']; 
     802        # return the name of the orphaned directory + the name of the orphaned 
     803        # file in order to make the path unique 
     804        return '/orphaned/' . $physname . '/'; 
    802805    } 
    803806 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.