2009-08-01, 13:49
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 :
I can select any folder of the system I like. The dialog is looking like this
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
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
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