Opened 14 years ago
Closed 14 years ago
#1314 closed defect (remind)
could not read a file from a NAS server
| Reported by: | Jorge | Owned by: | Jorge |
|---|---|---|---|
| Priority: | highest | Milestone: | Mantainance |
| Component: | Kernel | Version: | 2.0.1 |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
TOL fails to read a file from shared NAS location. This bug is generated on Ubuntu 10.04
Incluyendo /media/nas/bpr/kk.tol <E> ERROR: [1] No se puede abrir el fichero /media/nas/bpr/kk.tol</E> No ha sido incluido el fichero /media/nas/bpr/kk.tol [0.000 sec.]
Change History (3)
comment:1 Changed 14 years ago by
| Owner: | changed from Víctor de Buen Remiro to Jorge |
|---|---|
| Status: | new → assigned |
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
| Resolution: | → remind |
|---|---|
| Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.

The method "fstream::open" cannot open the file from the NAS location, and it has success when the file is opened with the constructor of fstream.
The code bellow shows the situation
#include <iostream> #include <fstream> using namespace std; int main( int argc, char* argv[] ) { char a[80]; #if defined( _TOL_) fstream fin; fin.open( "/media/nas/bpr/kk.tol" ); #if((defined(__GNUC__) && (__GNUC__>2)) ||(defined(_MSC_VER))) //fin.open( "/media/nas/bpr/kk.tol", ios::in ); fin.open( "/media/nas/bpr/kk.tol" ); #else fin.open( "/media/nas/bpr/kk.tol", ios::nocreate ); #endif #else fstream fin( "/media/nas/bpr/kk.tol" ); #endif cout << "fin ok? " << !!fin << endl; bool isOpen = fin.good( ); cout << "fin.good() = " << fin.good() << endl; if ( !fin ) { cout << "no se pudo abrir" << endl; } else { cout << "se pudo abrir" << endl; } while( isOpen && !fin.eof( ) ) { fin.getline( a, 79 ); cout << a << endl; } return 0; }