Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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 Iritscen)

-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:1 Changed 8 years ago by s10k

Edt that error is from OniSplit not Vago.

Do you know any way to pass it to OniSplit without causing that error?

Last edited 8 years ago by s10k (previous) (diff)

comment:2 Changed 8 years ago by Iritscen

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 Changed 8 years ago by Iritscen

  • Description modified (diff)
  • Summary changed from %2 in filename causes error to %2F in filename causes error

comment:4 Changed 8 years ago by edt

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?

Version 0, edited 8 years ago by edt (next)

comment:5 Changed 8 years ago by Iritscen

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 Changed 8 years ago by edt

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.

Last edited 8 years ago by edt (previous) (diff)

comment:7 Changed 8 years ago by s10k

  • Resolution set to invalid
  • Status changed from new to 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".

Last edited 8 years ago by s10k (previous) (diff)
Note: See TracTickets for help on using tickets.