close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#127 closed defect (fixed)

BDBOpen() and file not found -> a new empty file is created

Reported by: request Owned by: manuelb
Priority: normal Milestone:
Component: SetAlgebra Version: head
Severity: minor Keywords:
Cc:

Description

Bug 127 depend on Bug 104

BDBOpen() and file not found -> a new empty file is created

Note BDBOpen is only a read function not a write one.
Probably this is only a Windows problem and is a Windows problem
not a TOL problem (if Windows and not found then delete the new file)

Set inpBdb = BDBOpen("notfound.txt", 0, "\n", "", "");

Change History (6)

comment:1 Changed 21 years ago by request

dependson: 104

comment:2 Changed 21 years ago by manuelb

Owner: changed from danirus to manuelb

comment:3 Changed 21 years ago by manuelb

Status: newassigned

comment:4 Changed 21 years ago by rcsoto

status_whiteboard: Amazing! Even giving the ios:in flag to the ifstream open creates the file!

comment:5 Changed 21 years ago by manuelb

Resolution: fixed
Status: assignedclosed
status_whiteboard: Amazing! Even giving the ios:in flag to the ifstream open creates the file!

The problem is a wrong Visual C++ fstream's behaviour.
When opening a file, even when specifying ios::in mode, it would create it the file if
it was not found. Specifying ios::nocreate flag fixes the problem.

NOTE: ios::nocreate is NOT a member of type std::basic_ios; Therefore a
workarround for UNIX has been made as well to keep the old behaviour.

The fix for the problem is currently avaliable in the CVS.


comment:6 Changed 21 years ago by manuelb

blocked: 137
Note: See TracTickets for help on using tickets.