Page 1 of 1
Solved: specialFolderPath("documents") not workin on Linux
Posted: Tue Aug 05, 2014 12:10 am
by bmcgonag
I have tested my code on Mac and it works properly, but when I run it on Linux, it doesn't appear to do anything.
Code: Select all
put specialFolderPath("Documents") & "/CrossNotes" into sqlPathMain
if there is not a folder sqlPathMain then
create folder sqlPathMain
end if
However when I run it, nothing is ever put in the Documents folder in my home folder on Linux. I'm using Ubuntu 14.04.
I can run
Code: Select all
answer "Special Folder Path is " & specialFolderPath("documents")
and it shows:
Special Folder Path is
and that's it.
Is there something special I need to do for linux? If so, is there a way to tell what OS the program is running on programmatically?
Re: specialFolderPath("documents") not workin on Linux
Posted: Tue Aug 05, 2014 1:27 am
by FourthWorld
See the Dictionary entry for specialFolderPath - "documents" is not currently a supported constant on Linux.
At the moment, while most distros do provide a Documents folder, many don't.
Still, if you have sufficient interest in submitting an enhancement request for that I think it would make a nice addition on distros where Documents is supported:
http://quality.runrev.com/
Re: specialFolderPath("documents") not workin on Linux
Posted: Tue Aug 05, 2014 1:50 am
by bmcgonag
I would be happy to submit an enhancement request.
In the meantime, as to my second question, is there a way to tell what opertaing system the program is being run on?
Re: specialFolderPath("documents") not workin on Linux
Posted: Tue Aug 05, 2014 1:58 am
by FourthWorld
For a broad understand you can query "the platform" to return "MacOS", "Win32" or "Linux". For specifics within Linux you can use the shell function to query uname or proc.
Re: specialFolderPath("documents") not workin on Linux
Posted: Tue Aug 05, 2014 2:57 am
by bmcgonag
Awesome! Thank you so much.
Re: Solved: specialFolderPath("documents") not workin on Lin
Posted: Tue Aug 05, 2014 4:26 am
by FourthWorld
OT question: which do you use more, OS X or Ubuntu? How well do you like Ubuntu overall?
Re: Solved: specialFolderPath("documents") not workin on Lin
Posted: Tue Aug 05, 2014 4:33 pm
by bmcgonag
FourthWorld wrote:OT question: which do you use more, OS X or Ubuntu? How well do you like Ubuntu overall?
I use both quite regularly. I have both OS X machines and Linux machines in my home. I am also a founding member of my local Linux Users group.
Each have their strengths. For me Mac is slightly more stable overall, and for video editing, it's unbeatable.
For fast, reliable server stuff I definitely prefer linux. I can run a server that I hit pretty hard on an old machine with low RAM and it just runs like a champ. Additionally, Linux is getting better by leaps and bounds very constantly.
They are both great! If you forced me to choose to only use one, right now I'd have to go Mac, but I can see Linux taking it's place within a couple of years.