Page 1 of 1
"\" and "/" changing in file names in windows.
Posted: Sun Nov 09, 2014 9:14 pm
by Tribblehunter
Having a liitle issue with file names in windows 8
on one run of the livecode app i have built the filename of the file has "/" in the title.
on other runs it has "\" in the title.
Anyone else had this issue?
Re: "\" and "/" changing in file names in windows.
Posted: Sun Nov 09, 2014 10:24 pm
by FourthWorld
LiveCode uses the standard Unix convention internally. Under what circumstances were you seeing Windows paths?
Re: "\" and "/" changing in file names in windows.
Posted: Sun Nov 09, 2014 10:33 pm
by Tribblehunter
Hi.
Code: Select all
get the mainStack of me
put the filename of stack it into tFilename
Filename had "/" as seperator, but then code failed and it had changed to "\".
It is an autosave stack which I add to my mainstacks which saves the file every 600 seconds under a new name using time and date reference
Code: Select all
set itemdelimiter to "/"
delete last item of tFileName
put it into tVersion
put "/"& tVersion&& tDate2&tTime&".livecode" after tFileName
save stack tVersion as tFileName
Re: "\" and "/" changing in file names in windows.
Posted: Sun Nov 09, 2014 11:01 pm
by FourthWorld
Tribblehunter wrote:Filename had "/" as seperator, but then code failed and it had changed to "\".
What is the recipe to reproduce this failure?
I've never seen LiveCode use anything but Unix paths in the 17 years I've been using it, but perhaps this is a recent regression. The code needed to reproduce the issue along with the version number of the LiveCode engine in which this fails will allow the team to fix this quickly.
Re: "\" and "/" changing in file names in windows.
Posted: Mon Nov 10, 2014 12:13 pm
by Klaus
Quick shot:
You are using the variable tDate2 in your script, does it hold an ENGLISH date?
That will have SLASHES in it and maybe LC tries to ESCAPE these in the filename when saving to disk?
Re: "\" and "/" changing in file names in windows.
Posted: Mon Nov 17, 2014 7:53 pm
by Tribblehunter
Hi all.
Trying to recreate the glitch. Will post details when it occurs again. If at all.