Solved: specialFolderPath("documents") not workin on Linux

Deploying to Linux? Get penguinated here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Solved: specialFolderPath("documents") not workin on Linux

Post by bmcgonag » Tue Aug 05, 2014 12:10 am

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?
Last edited by bmcgonag on Tue Aug 05, 2014 2:58 am, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9867
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: specialFolderPath("documents") not workin on Linux

Post by FourthWorld » Tue Aug 05, 2014 1:27 am

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/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Re: specialFolderPath("documents") not workin on Linux

Post by bmcgonag » Tue Aug 05, 2014 1:50 am

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9867
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: specialFolderPath("documents") not workin on Linux

Post by FourthWorld » Tue Aug 05, 2014 1:58 am

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Re: specialFolderPath("documents") not workin on Linux

Post by bmcgonag » Tue Aug 05, 2014 2:57 am

Awesome! Thank you so much.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9867
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Solved: specialFolderPath("documents") not workin on Lin

Post by FourthWorld » Tue Aug 05, 2014 4:26 am

OT question: which do you use more, OS X or Ubuntu? How well do you like Ubuntu overall?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Re: Solved: specialFolderPath("documents") not workin on Lin

Post by bmcgonag » Tue Aug 05, 2014 4:33 pm

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.

Post Reply

Return to “Linux”