From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 7 Aug 2016 16:09:43 +0100 Subject: Display of directories that contain only one subdirectory In-Reply-To: <20160713224306.GA4187@neptune> References: <20160713194928.ebdeywwvx2vhgyxn@john.keeping.me.uk> <20160713224306.GA4187@neptune> Message-ID: <20160807150943.outbmcjqodr2evnd@john.keeping.me.uk> On Wed, Jul 13, 2016 at 06:43:06PM -0400, Jamie Couture wrote: > So what I was initially wasting my time worrying about was an insane situation > where there are many empty directories with only one file at the end of the > tunnel. > > mkdir -p why/would/anyone/do/this/what/possible/reason/would/justify/such/a/deep/structure/with/nothing/of/value/come/on > touch why/would/anyone/do/this/what/possible/reason/would/justify/such/a/deep/structure/with/nothing/of/value/come/on/hi.txt > > Where we might end up with something that does not word wrap, but our css does > take care of it: so moot point. The other consideration I was worrying about > was skipping all the in-between folders since there's nothing of value, > display some ellipsis: > > some / path / ... / end > > I'm not sure if there's much value in truncating that scenario. (I finally have some time to look at this again.) I don't think it's worth the extra complexity to handle putting in ellipses for this case. I tried a long path with a very narrow browser window and it wraps sensibly, which I think is acceptable. Note that the patch here won't display the file at the end of your second example above - it explicitly checks for directories, which is a conscious choice so that we don't have to go back and correct the mode bits in the first column.