Changeset 202 for CMT


Ignore:
Timestamp:
Jun 9, 2006, 10:20:33 AM (18 years ago)
Author:
garonne
Message:

modify touch function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_system.cxx

    r201 r202  
    423423    if (CmtSystem::test_file(name))
    424424       {
    425             FILE* f = fopen (name, "a+");
     425            static cmt_string s;
     426            s.read (name);
     427            unlink  (name);
     428            FILE* f = fopen (name, "wb");
     429            if (f != NULL)
     430            {
     431              s.write (f);
     432              fclose (f);
     433              return (true);
     434            }
     435           
     436/*            FILE* f = fopen (name, "a+");
     437
    426438            if (f != NULL)
    427439            {
    428440                 cmt_string empty = " ";
    429441                 empty.write(f);
     442                 
    430443                 fclose (f);
    431444                 return true;
    432445             }   
     446*/             
    433447        }
    434448    return false;
Note: See TracChangeset for help on using the changeset viewer.