Ted fails to load from network paths
Monkey Forums/Monkey Bug Reports/Ted fails to load from network paths
| ||
In Windows Explorer, double-clicking a file located on a network starts up Ted, but then it just thrashes for a bit and quietly gives up on the idea (no error, no file loaded). I notice that if I navigate via the Open File dialog it does throw up an error, but prepends the stated path with "C:", like so: Network path: \\RASPBERRYPI\pi\Desktop\Dev\monkey\src\trans\trans.monkey Result: Error opening file: C:\\RASPBERRYPI\pi\Desktop\Dev\monkey\src\trans\trans.monkey ... so I guess it's somehow trying to 'fix' the path... ? (Bonus point: can you guess what I forgot to do yesterday after building Ted?) |
| ||
Just found you get the same error when saving (via Save As), BTW. |
| ||
I'm not sure how to go about building Ted for Windows (I just had to apt-get the Qt-dev stuff on Linux!), but I had a look and found it's down to std.c -> fixPath. I can't test it, but reckon this would do it, if I have my C++ 'else' syntax correct... After #ifdef Q_OS_WIN32, change this line: if( path.startsWith( '/' ) ) path=QDir::rootPath()+path.mid( 1 ); ... to... if( path.startsWith( '//' ) ) path=path.replace( '\/','\' ); // All back to UNC-style slashes, and don't "fix"! else if( path.startsWith( '/' ) ) path=QDir::rootPath()+path.mid( 1 ); So the path \\RASPBERRYPI\pi\Desktop\Dev\monkey\src\trans\trans.monkey would effectively have had its slashes swapped around by the first few lines, hence just swap back and return. |