| 1923 | |
| 1924 | |
| 1925 | void FileDialog::DirToPath(tList<tStringItem>& destPath, const tString& srcdir) |
| 1926 | { |
| 1927 | destPath.Empty(); |
| 1928 | if (srcdir.IsEmpty()) |
| 1929 | return; |
| 1930 | |
| 1931 | // Smallest path would be "/" |
| 1932 | tString dir(srcdir); |
| 1933 | bool isNetwork = false; |
| 1934 | if ((dir.Length() >= 2) && (dir[0] == '\\') && (dir[1] == '\\')) |
| 1935 | isNetwork = true; |
| 1936 | |
| 1937 | if (isNetwork) |
| 1938 | destPath.Append(new tStringItem("Network")); |
| 1939 | else |
| 1940 | destPath.Append(new tStringItem("Root")); |
| 1941 | |
| 1942 | dir.Replace("\\\\", "/"); |
| 1943 | dir.Replace("\\", "/"); |
| 1944 | |
| 1945 | if (dir[0] == '/') |
| 1946 | dir.ExtractLeft('/'); |
| 1947 | |
| 1948 | tExplode(destPath, dir, '/'); |
| 1949 | } |
nothing calls this directly
no outgoing calls
no test coverage detected