Closed vladak closed 7 years ago
The code in question does this:
96 private static String getSimplifiedPath(File dir) {
97 String[] files = dir.list();
98 if (files.length == 1) {
99 File entry = new File(dir, files[0]);
100 if (entry.isDirectory()) {
101 return (dir.getName() + "/" + getSimplifiedPath(entry));
102 }
103 }
104 return dir.getName();
105 }
According to JavaDoc, dir.list() can return null (https://docs.oracle.com/javase/8/docs/api/java/io/File.html#list--) so check will fix this however proper root cause is needed.
I see these entries in the directory:
drwxr-xr-x 8 vkotal staff 14 Jan 30 21:36 .
drwxr-xr-x 310 vkotal staff 311 Jan 10 04:08 ..
-rw-r--r-- 1 vkotal staff 4880 Nov 23 00:08 Makefile
-rw-r--r-- 1 vkotal staff 2379 Oct 5 04:07 gvim.p5m
-rw-r--r-- 1 vkotal staff 753 Apr 8 2013 help_minimized.txt
drwxr-xr-x 2 vkotal staff 8 Nov 23 00:08 patches
drwx------ 2 vkotal staff 2 Jan 30 21:36 tmpSdWCDH
drwx------ 2 vkotal staff 2 Jan 28 01:44 tmpW_VTsQ
drwx------ 2 vkotal staff 2 Jan 19 09:37 tmpY_2HPw
drwx------ 2 vkotal staff 2 Jan 25 21:37 tmprPjlq_
drwx------ 2 vkotal staff 2 Jan 27 05:34 tmptt_olX
-rw-r--r-- 1 vkotal staff 5156 Oct 5 04:07 vim-core.p5m
-rw-r--r-- 1 vkotal staff 92628 Nov 23 00:08 vim.p5m
-rw-r--r-- 1 vkotal staff 322 Oct 5 04:07 xxd.license
given the webapp runs under webservd
user, it makes me wonder whether this problem is caused by the permissions on the tmp
directories.
Verified - caused by permissions.
when displaying
xref/userland-default-prepped/components/vim/
exception was raised: