weimingtom / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Does not handle spaces in Windows-style Path correctly #237

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create .proto file in a path where at least one folder has a space in its 
name.
2. Save .proto file

What is the expected output? What do you see instead?
I see:
[command] protoc --proto_path=C:\Users\myusername\My Stuff\restofpath\src 
--java_out=C:\Users\myusername\My Stuff\restofpath\src C:\Users\myusername\My 
Stuff\restofpath\FileName.proto
[protoc]  C:\Users\myusername\My: warning: directory does not exist.
[protoc]  Stuff\restofpath\src: No such file or directory

I expect:
Well, a proper compilation of course. This might work:
[command] protoc --proto_path="C:\Users\myusername\My Stuff\restofpath\src" 
--java_out="C:\Users\myusername\My Stuff\restofpath\src" 
"C:\Users\myusername\My Stuff\restofpath\FileName.proto"

What version of the product are you using? On what operating system?
Eclipse 3.7.1
protobuf-dt 1.3.3
Windows 7 64bit

Please provide any additional information below.

Original issue reported on code.google.com by sascha.t...@gmail.com on 24 Jan 2013 at 5:12

GoogleCodeExporter commented 8 years ago
Seems really simple to just fix the issue by quoting the paths. This is really 
really annoying.

Original comment by stev...@gmail.com on 28 May 2013 at 12:22

GoogleCodeExporter commented 8 years ago
A simple patch to test if a path contains a string and place a char '\"' around 
the path, or leave it alone if it does not.  Fixed for both path of 
protoc[.exe] and the options for java, c++, python outputs and the 
descriptor.proto path.

patch is from git head c9d6ac6a63312fcaa72895cc2b34fb2f9187342a

Original comment by hunters...@gmail.com on 31 Aug 2013 at 2:35

Attachments: