Select any folder of a Linux-system with dialog
#1
Hello to all ...)

I have a little problem with a dialog-function to select any folder of a linux-system

My codes looks like this :

Code:
if (choice == 1):
               dialog = xbmcgui.Dialog()
               directory_1 = dialog.browse(0,__language__(33063), 'files', '', False, False, '//')
               if (directory_1 != '//'):                
                   directory_2 =  directory_1[1:-1]
                   configuration[1] = directory_2
                   changed = True

I can select any folder of the system I like. The dialog is looking like this

Image

All is working fine ... the code

directory_2 = directory_1[1:-1]

makes the directory path looking right...

As long the user dont use .. in the list everything is ok and my paths are saved
correct .... If a user selects .. and then select home folder the functions returns as
example home/user witch would produce a error ....

Can I remove this entry from the list .... ? To prevent the user to select this entry ..


For the next release for my dvd-ripper script this is essential ..

Regards
Hans
Reply
#2
How about if the user selects the home dir, just popup a message saying home is not allowed and get the user back into the select dialog...
Reply

Logout Mark Read Team Forum Stats Members Help
Select any folder of a Linux-system with dialog0