unMenu file browser


Recommended Posts

Hi Joe,

 

I'm wondering why you disallow directories with spaces in their name in this plug-in?  I know it's non-standard in the Unix world for file and directory names to have spaces, but it does work.  I'm not sure I understand why it can't or shouldn't be used as a convention in exported movie/song (etc) titles?  On unRAID they seem to export ok and clients don't seem to have a problem with them...

 

Are there other areas in unRAID in general where this is not a good idea, or doesn't work?

 

--Bill

Link to comment

Hi Joe,

 

I'm wondering why you disallow directories with spaces in their name in this plug-in?  I know it's non-standard in the Unix world for file and directory names to have spaces, but it does work.  I'm not sure I understand why it can't or shouldn't be used as a convention in exported movie/song (etc) titles?  On unRAID they seem to export ok and clients don't seem to have a problem with them...

 

Are there other areas in unRAID in general where this is not a good idea, or doesn't work?

 

--Bill

Can you give me an example of what does not work? 
Link to comment

Can you give me an example of what does not work? 

 

When you go into the file browser in unMenu, select a filesystem, and then click on a directory whose name has spaces, you get this response:

 

File Browser

Directory: invalid-directory/

Sorry: Access to invalid-directory/ is not permitted.

 

Single name directories in the same filesystem work fine.

 

--Bill

Link to comment

Can you give me an example of what does not work? 

 

When you go into the file browser in unMenu, select a filesystem, and then click on a directory whose name has spaces, you get this response:

 

File Browser

Directory: invalid-directory/

Sorry: Access to invalid-directory/ is not permitted.

 

Single name directories in the same filesystem work fine.

 

--Bill

Fixed...   You can either edit the file yourself, or use the fixed version attached to this post.

 

In file 30-unmenu-file_browser.awk

Change line 201 from

       

[size=10pt][b][color=blue]  cmd="cd " decodedDir " 2>/dev/null && pwd || echo invalid-directory "
[/color][/b][/size]

to

           

[size=10pt][b][color=blue] cmd="cd '''" decodedDir "''' 2>/dev/null && pwd || echo invalid-directory "
[/color][/b][/size]

 

The added characters are highlighted in red below to make it more clear...  there are three single-quote characters ' in each of two places added.

cmd="cd '''" decodedDir "''' 2>/dev/null && pwd || echo invalid-directory "

 

Or  even easier... download the fixed version attached to this post, and unzip in the folder with your other unMENU plug-in files.

 

Joe L.

Link to comment

[...]

 

Or  even easier... download the fixed version attached to this post, and unzip in the folder with your other unMENU plug-in files.

 

Joe L.

 

Thanks Joe for the Update. I try to "collect" those updates to keep my Unmenu ok - just checked Googlecode for latest version, but there is still 1.1 from 2008.

 

Is there any chance to have one thread where all updates get published? Would make things easier for everybody to find ...

Link to comment

[...]

 

Or  even easier... download the fixed version attached to this post, and unzip in the folder with your other unMENU plug-in files.

 

Joe L.

 

Thanks Joe for the Update. I try to "collect" those updates to keep my Unmenu ok - just checked Googlecode for latest version, but there is still 1.1 from 2008.

 

Is there any chance to have one thread where all updates get published? Would make things easier for everybody to find ...

Yeah, I need to put together a 1.2 set of zip files...  with the current versions I'm running (I'm assuming I have made all the fixes for items discovered). 

 

Joe L.

Link to comment

Fixed...   You can either edit the file yourself, or use the fixed version attached to this post.

 

In file 30-unmenu-file_browser.awk

Change line 201 from

       

[size=10pt][b][color=blue]  cmd="cd " decodedDir " 2>/dev/null && pwd || echo invalid-directory "
[/color][/b][/size]

to

           

[size=10pt][b][color=blue] cmd="cd '''" decodedDir "''' 2>/dev/null && pwd || echo invalid-directory "
[/color][/b][/size]

 

The added characters are highlighted in red below to make it more clear...  there are three single-quote characters ' in each of two places added.

cmd="cd '''" decodedDir "''' 2>/dev/null && pwd || echo invalid-directory "

 

Or  even easier... download the fixed version attached to this post, and unzip in the folder with your other unMENU plug-in files.

 

Thanks Joe!  You certainly are a master script-writer.

 

I'm no stranger to awk, but the use of the pair of triple single quotes eludes me.  What is actually happening there?

 

--Bill

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.