Changeset 37c9aa7 in tol


Ignore:
Timestamp:
May 9, 2012, 2:52:44 PM (14 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
9042aac
Parents:
77a7024
Message:

refs #1502, se corrige un error en UninstallPackage y se restaura LocalClean

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4663 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/TolPackage/client.tol

    r77a7024 r37c9aa7  
    6969
    7070  //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
     71  Real LocalClean(Text package)
     72  //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
     73  {
     74    Real UninstallPackage( package )
     75  };
     76 
     77  //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
    7178  Text LocalLastCompatible(Text package)
    7279  //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
    … …  
    137144    // Se trata el hecho de que pueda haberse indicado la ruta del archivo
    138145    Text pattern = Replace(GetFileName(package), ".zip", "");
    139     Text parts = Tokenizer(pattern, ".")[3];
    140     Set parts := parts << For(1, 3-Card(parts), Text (Real i) { "*" });
     146    Set parts = Tokenizer(pattern, ".");
     147    Set Append( parts, For( Card(parts) + 1, 3, Text (Real i) { "*" } ) );
    141148    Text txtPattern = parts[1]<<"."<<parts[2]<<"."<<parts[3];
    142149    Set dir = GetDir(_.localRoot)[2];
    143150    Set sel = EvalSet(GetDir(_.localRoot)[2], Real (Text subdir) {
    144       If(TextMatch(sub ,txtPattern), OSDirRemove(_.localRoot<<subdir), 0)
     151      If(TextMatch(subdir ,txtPattern), OSDirRemove(_.localRoot<<subdir), 0)
    145152    });
    146153    If(Card(sel), SetSum(sel), 0)
Note: See TracChangeset for help on using the changeset viewer.