Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test-symmetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
command: |
addpath(genpath("src"));
addpath(genpath("tests"));
addpath(genpath("tests_symmetry"));
import matlab.unittest.TestRunner;
import matlab.unittest.TestSuite;
import matlab.unittest.plugins.DiagnosticsOutputPlugin;
Expand All @@ -61,6 +62,7 @@ jobs:
command: |
addpath(genpath("src"));
addpath(genpath("tests"));
addpath(genpath("tests_symmetry"));
import matlab.unittest.TestRunner;
import matlab.unittest.TestSuite;
runner = TestRunner.withTextOutput;
Expand Down
12 changes: 6 additions & 6 deletions src/did/+did/+file/binaryTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
%
[lockfid,key] = binaryTableObj.getLock();
binaryTableObj.file.fclose();
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();
headerData = uint8(fread(binaryTableObj.file,binaryTableObj.headerSize,'uint8'));
binaryTableObj.file.fclose();
Expand Down Expand Up @@ -210,7 +210,7 @@ function releaseLock(binaryTableObj, lockfid, key)

% obtain the lock so the file can't change while we read it
[lockfid,key] = binaryTableObj.getLock();
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();

[r,~] = binaryTableObj.getSize();
Expand Down Expand Up @@ -279,7 +279,7 @@ function insertRow(binaryTableObj, insertAfter, dataCell)
end
binaryTableObj.file.fclose();
else % copy over everything to temp file before inserting and moving back
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();
beforeBytes = binaryTableObj.headerSize + insertAfter * binaryTableObj.rowSize();
totalBytes = (binaryTableObj.headerSize + r * binaryTableObj.rowSize());
Expand Down Expand Up @@ -340,7 +340,7 @@ function deleteRow(binaryTableObj, row)

[lockfid,key] = binaryTableObj.getLock();
binaryTableObj.file.fclose();
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();
beforeBytes = binaryTableObj.headerSize + (row-1) * binaryTableObj.rowSize();
totalBytes = (binaryTableObj.headerSize + r * binaryTableObj.rowSize());
Expand Down Expand Up @@ -426,7 +426,7 @@ function writeTable(binaryTableObj, data)
%
[lockfid,key] = binaryTableObj.getLock();
binaryTableObj.file.fclose();
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();
fid = fopen(binaryTableObj.tempFileName(),'w');

Expand Down Expand Up @@ -486,7 +486,7 @@ function writeTable(binaryTableObj, data)
if ~option.isRecurrent
[lockfid,key] = binaryTableObj.getLock();
binaryTableObj.file.fclose();
binaryTableObj.file = binaryTableObj.file.setproperties('permission','r');
binaryTableObj.file = binaryTableObj.file.setproperties('permission','rb');
binaryTableObj.file.fopen();
end

Expand Down
2 changes: 1 addition & 1 deletion src/did/+did/+implementations/binarydoc_matfid.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

arguments
fileProps.machineformat (1,1) string {did.file.mustBeValidMachineFormat} = 'l'; % native machine format
fileProps.permission (1,1) string {did.file.mustBeValidPermission} = "r"
fileProps.permission (1,1) string {did.file.mustBeValidPermission} = "rb"
fileProps.fid (1,1) int64 = -1
fileProps.fullpathfilename = '';
matfidProps.key = ''
Expand Down
Loading