osqp / osqp-matlab

Matlab interface for OSQP
https://osqp.org/
Apache License 2.0
42 stars 25 forks source link

Update osqp.m #42

Closed vineetbansal closed 3 years ago

vineetbansal commented 3 years ago

On MATLAB on Windows (version 2020a in my tests), the emosqp_mex.mexw64 file generated by make_osqp is generated with the read-only flag set. Subsequent attempt by osqp.m to rename the file results in an error ("cannot write to destination"). While I haven't deeply investigated why this is the default behavior on Windows, adding the 'f' flag as here results in the operation proceeding as expected, on both Windows and Linux.

This seems to me to be an acceptable change since a forced rename is what the code is trying to do in spirit anyway.