aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/myriadfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unstable/myriadfs.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/unstable/myriadfs.cpp b/src/unstable/myriadfs.cpp
index 919f8b9..e02620d 100644
--- a/src/unstable/myriadfs.cpp
+++ b/src/unstable/myriadfs.cpp
@@ -113,7 +113,7 @@ void Bu::MyriadFs::stat( const Bu::String &sPath, Bu::MyriadFs::Stat &rBuf )
113 stat( iNode, rBuf, is ); 113 stat( iNode, rBuf, is );
114} 114}
115 115
116Bu::MyriadStream Bu::MyriadFs::open( const Bu::String &sPath, int /*iMode*/, 116Bu::MyriadStream Bu::MyriadFs::open( const Bu::String &sPath, int iMode,
117 uint16_t uPerms ) 117 uint16_t uPerms )
118{ 118{
119 int32_t iParent = -1; 119 int32_t iParent = -1;
@@ -123,7 +123,12 @@ Bu::MyriadStream Bu::MyriadFs::open( const Bu::String &sPath, int /*iMode*/,
123 iNode = lookupInode( sPath, iParent ); 123 iNode = lookupInode( sPath, iParent );
124// sio << "File found." << sio.nl; 124// sio << "File found." << sio.nl;
125 // The file was found 125 // The file was found
126 return openByInode( iNode ); 126 Bu::MyriadStream ms = openByInode( iNode );
127 if( (iMode&Truncate) )
128 {
129 ms.setSize( 0 );
130 }
131 return ms;
127 } 132 }
128 catch( Bu::MyriadFsException &e ) 133 catch( Bu::MyriadFsException &e )
129 { 134 {