#111 closed defect (invalid)
%2F in filename causes error
Reported by: | EdT | Owned by: | s10k |
---|---|---|---|
Priority: | major | Component: | Vago |
Keywords: | Cc: |
Description (last modified by )
-create "/Users/EKT2014/Games/Oni/AE/Tools/VagoGUI/VagoWorkspace/XML/XML - ONI/" "/Users/EKT2014/Desktop/TXMPIteration001%2FKS_chestpack.xml"
System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/EKT2014/Desktop/TXMPIteration001/KS_chestpack.xml".
It has been such a long time having to deal with %2F in a filename I forgot the solution :(
Edit: You mean "%2F" --Iritscen
Change History (7)
comment:2 by , 9 years ago
If I may butt in here, I tried sending a file with "%2F" in it to OniSplit on the command line, and it worked fine, so it seems that there's an issue in the way that Vago is encoding and passing the command string to OniSplit. Something in Qt, perhaps, is interpreting the %2F as the ASCII hex code for "/" (which, of course, it is), rather than passing it as-is.
comment:3 by , 9 years ago
Description: | modified (diff) |
---|---|
Summary: | %2 in filename causes error → %2F in filename causes error |
comment:4 by , 9 years ago
s10k
I use this code:
on convert_path_to_UNIX(raw_path_name)
set safe_path_name to ""
set found_colon to false
set first_colon to 1
set escape_list to {" ", "'", "(", ")","%2F"} -- add any other char.s that need escaping here
set colon to ":" -- gets changed to forward-slash if present
set num_escapes to count of escape_list
set num_char to count of characters in raw_path_name
set found_colon to false
repeat with x from first_colon to num_char -- start after hard drive's name
if (character x in raw_path_name is colon) then
set safe_path_name to safe_path_name & "/"
set found_colon to true
else
repeat with y from 1 to num_escapes
if (character x in raw_path_name is (item y of escape_list)) then
set safe_path_name to safe_path_name & "
"
end if
end repeat
end if
if (found_colon is false) then
set safe_path_name to safe_path_name & character x in raw_path_name
else
set found_colon to false
end if
end repeat
return safe_path_name
end convert_path_to_UNIX
Iritscen: Did you write this code for me?
comment:5 by , 9 years ago
The code you posted is not going to be useful to s10k since it's in AppleScript :-) He just needs to figure out how to get Qt to not interpret tokens like %2F when sending a command to the command line.
comment:6 by , 9 years ago
Interesting, this command works:
mono onisplit.exe -create:txmp /Users/EKT2014/Desktop -genmipmaps -format:bgra32 -envmap:TXMPenvksface /Users/EKT2014/Desktop/TXMPIteration001%2FKS_face.tga
but this gets the error message:
mono onisplit.exe -create /Users/EKT2014/Desktop /Users/EKT2014/Desktop/TXMPIteration001%2FKS_face.xml
Edit: Trying to escape the %2F with this: TXMPIteration001\%2FKS_face.xml did not work either. I sent a message to Neo by Yahoo Messenger, hopefully he can fix this.
comment:7 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
@Iritscen this is definitely a OniSplit problem, not a Vago one.
For example this command:
mono OniSplit.exe -create "/Users/ricardosantos/qt-workspace/VagoGUI/trunk/build-Vago-Desktop_Qt_5_6_0_clang_64bit-Debug/VagoWorkspace/XML/XML - ONI/" "/Users/ricardosantos/qt-workspace/VagoGUI/trunk/build-Vago-Desktop_Qt_5_6_0_clang_64bit-Debug/VagoWorkspace/XML/ONI - XML/BINACJBOCombat%2F.xml"
Gives the same error when executed from the MacOS X terminal as in Vago:
WARNING: The runtime version supported by this application is unavailable. Using default runtime: v4.0.30319 Importing /Users/ricardosantos/qt-workspace/VagoGUI/trunk/build-Vago-Desktop_Qt_5_6_0_clang_64bit-Debug/VagoWorkspace/XML/ONI - XML/BINACJBOCombat%2F.xml System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/ricardosantos/qt-workspace/VagoGUI/trunk/build-Vago-Desktop_Qt_5_6_0_clang_64bit-Debug/VagoWorkspace/XML/ONI - XML/BINACJBOCombat/.xml".
Edt that error is from OniSplit not Vago.
Do you know any way to pass it to OniSplit without causing that error?