Changeset 653

Show
Ignore:
Timestamp:
06/30/07 19:17:19 (1 year ago)
Author:
Gregor
Message:

sss/clean.d, sss/uninstall.d: dsss uninstall now removes (empty) directories as well as files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/ChangeLog

    r652 r653  
    11SVN from 0.67: 
    22        - Rebuild: -of<name> now converts / to \ on Windows (see ticket #85). 
     3        - `dsss uninstall` now removes (empty) directories as well as files 
     4          (see ticket #84). 
    35 
    460.67 from 0.66: 
  • trunk/sss/clean.d

    r540 r653  
    4343    try { 
    4444        std.file.remove(fn); 
     45    } catch (Exception e) { 
     46        // ignored 
     47    } 
     48} 
     49 
     50/** Clean a tree: Remove all empty directories in the tree */ 
     51void cleanTree(char[] dirn) 
     52{ 
     53    try { 
     54        rmdir(dirn); 
     55        cleanTree(getDirName(dirn)); 
    4556    } catch (Exception e) { 
    4657        // ignored 
  • trunk/sss/uninstall.d

    r539 r653  
    7272                writefln("Removing %s", file); 
    7373                tryRemove(file); 
     74                cleanTree(getDirName(file)); 
    7475            } 
    7576        }