Commit: 7af5bd0b3a5663049105e28b516ca97a37614c80
Author: Sergey Sharybin
Date:   Fri Sep 26 15:07:59 2014 +0600
Branches: blender-v2.72-release
https://developer.blender.org/rB7af5bd0b3a5663049105e28b516ca97a37614c80

Fix T41962: Command-line without specified filename doesn't renders

Issue was caused by the launcher not dealing with slashes in the way
windows expects them to be handled -- last slash of the path considered
an escape character for the following qoute.

This is definitely to be ported to the 2.72 release.

===================================================================

M       source/creator/creator_launch_win.c

===================================================================

diff --git a/source/creator/creator_launch_win.c 
b/source/creator/creator_launch_win.c
index a7e04b2..03f28cd 100644
--- a/source/creator/creator_launch_win.c
+++ b/source/creator/creator_launch_win.c
@@ -58,9 +58,14 @@ int main(int argc, const char **UNUSED(argv_c))
        wcsncpy(command, BLENDER_BINARY, len - 1);
        len -= wcslen(BLENDER_BINARY);
        for (i = 1; i < argc; ++i) {
+               size_t argument_len = wcslen(argv_16[i]);
                wcsncat(command, L" \"", len - 2);
                wcsncat(command, argv_16[i], len - 3);
-               len -= wcslen(argv_16[i]) + 1;
+               len -= argument_len + 1;
+               if (argv_16[i][argument_len - 1] == '\\') {
+                       wcsncat(command, L"\\", len - 1);
+                       len--;
+               }
                wcsncat(command, L"\"", len - 1);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to