bblue Posted September 8, 2009 Share Posted September 8, 2009 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 Quote Link to comment
Joe L. Posted September 8, 2009 Share Posted September 8, 2009 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? Quote Link to comment
bblue Posted September 8, 2009 Author Share Posted September 8, 2009 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 Quote Link to comment
Joe L. Posted September 8, 2009 Share Posted September 8, 2009 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. Quote Link to comment
Guzzi Posted September 8, 2009 Share Posted September 8, 2009 [...] 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 ... Quote Link to comment
Joe L. Posted September 8, 2009 Share Posted September 8, 2009 [...] 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. Quote Link to comment
bblue Posted September 9, 2009 Author Share Posted September 9, 2009 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 Quote Link to comment
Recommended Posts
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.