File: wslPathCorrection.m

package info (click to toggle)
bart 0.9.00-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,040 kB
  • sloc: ansic: 116,116; python: 1,329; sh: 726; makefile: 639; javascript: 589; cpp: 106
file content (10 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
%Soumick Chatterjee <soumick.chatterjee@ovgu.de>

function [outData] = wslPathCorrection(inData)
    outData=inData;
    for i = 'a':'z' %Replace drive letters with /mnt/
        outData=strrep(outData,[i,':'],['/mnt/',i]); %if drive letter is supplied in lowercase
        outData=strrep(outData,[upper(i),':'],['/mnt/',i]); %if drive letter is supplied as uppercase
    end
    outData = strrep(outData, '\', '/'); %Change windows filesep to linux filesep
end