Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 1560

Show
Ignore:
Timestamp:
05/26/10 14:21:56 (15 years ago)
Author:
rsinfu
Message:

Fixed bugzilla 4188: std.file.remove throws Exception on success.

cenforce() used getErrno(), not GetLastError?(), for errors happened in Win32 API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docsrc/changelog.dd

    r1555 r1560  
    1414    $(LI $(BUGZILLA 2738): Rebindable should work for interfaces.) 
    1515    $(LI $(BUGZILLA 2835): std.socket.TcpSocket doesn't actually connect) 
    1616    $(LI $(BUGZILLA 3088): std.xml.check() fails on xml comments) 
    1717    $(LI $(BUGZILLA 3200): std.xml doesn't follow spec for Tag.text) 
    1818    $(LI $(BUGZILLA 3465): isIdeographic can be wrong in std.xml) 
    1919    $(LI $(BUGZILLA 3653): Problem sorting array of Rebindable) 
    2020    $(LI $(BUGZILLA 3786): bug in std.string.removechars) 
    2121    $(LI $(BUGZILLA 3873): std.range.repeat should have popBack defined) 
    2222    $(LI $(BUGZILLA 3880): std.regex functions with const/immutable Regex object) 
    2323    $(LI $(BUGZILLA 4109): writeln doesn't work with empty static array) 
     24    $(LI $(BUGZILLA 4188): std.file.remove throws Exception on success) 
    2425    $(LI $(BUGZILLA 4202): Changset 1517 doesn't compile) 
    2526    $(LI $(BUGZILLA 4228): std.array.replace contains 2 bugs) 
    2627    $(LI $(BUGZILLA 4219): hasAliasing does not care about immutable) 
    2728    ) 
    2829) 
    2930 
    3031<div id=version> 
    3132$(UL 
    3233    $(NEW 047) 
    3334    $(NEW 046) 
  • trunk/phobos/std/file.d

    r1519 r1560  
    160160        this.errno = errno; 
    161161    } 
    162162} 
    163163 
    164164private T cenforce(T, string file = __FILE__, uint line = __LINE__) 
    165165(T condition, lazy const(char)[] name) 
    166166{ 
    167167    if (!condition) 
    168168    { 
    169169        throw new FileException( 
    170             text("In ", file, "(", line, "), data file ", name), .getErrno); 
     170            text("In ", file, "(", line, "), data file ", name)); 
    171171    } 
    172172    return condition; 
    173173} 
    174174 
    175175/* ********************************** 
    176176 * Basic File operations. 
    177177 */ 
    178178 
    179179/******************************************** 
    180180Read entire contents of file $(D name).