Fix File test
This commit is contained in:
parent
8e00882bb3
commit
62cb2bb8b7
5 changed files with 13 additions and 12 deletions
|
|
@ -12,11 +12,11 @@ bool File::connect(const FileLocation& location, const FileConnectionType& conne
|
|||
|
||||
switch (connectionInfo.getType()) {
|
||||
case FileConnectionType::READ:
|
||||
handle->open(location.getLocation().read(), true);
|
||||
handle->open(location.getLocation().read(), false);
|
||||
break;
|
||||
|
||||
case FileConnectionType::WRITE:
|
||||
handle->open(location.getLocation().read(), false);
|
||||
handle->open(location.getLocation().read(), true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -31,6 +31,7 @@ bool File::connect(const FileLocation& location, const FileConnectionType& conne
|
|||
|
||||
mStatus.setStatus(FileConnectionStatus::OPENED);
|
||||
mHandle = handle;
|
||||
mConnectionType = connectionInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void FileSystemHandle::seekp(ualni in) {
|
|||
|
||||
void FileSystemHandle::read(int1* in, ualni size) {
|
||||
auto strm = (std::fstream*) stream;
|
||||
strm->write(in, size);
|
||||
strm->read(in, size);
|
||||
}
|
||||
|
||||
void FileSystemHandle::write(const int1* in, ualni size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue