ASCCON / DStat

Quickly gather and print directory statistics.
MIT License
1 stars 0 forks source link

Directory uniqueness check not working properly #42

Closed ASCCON closed 7 months ago

ASCCON commented 7 months ago

It seems Issue #27 was closed prematurely:

[ wgd@LIGETI Lo 65F8BE2B Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat
Directory:
    /Users/wgd/code/ASCCON/DStat

Totals:
       4:directories
       0:FIFO files
       0:character special files
       0:block special files
       7:regular files
       0:symlinks
       0:sockets
       0:union whiteout files
       0:unknown file types
[ wgd@LIGETI Lo 65F8BE30 Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat /usr /tmp /var /etc
/usr: directory not unique: Operation not permitted
[ wgd@LIGETI Lo 65F8BE3D Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat /usr /tmp /var /etc
<DEBUG> dstat.c:182:createDirList(): initialised dir_path
<DEBUG> dstat.c:694:main(): loop: 00: param_index = 1, dir_cnt = 0
<DEBUG> dstat.c:250:testDir(): user: /usr
<DEBUG> dstat.c:260:testDir(): TRUE 1
<DEBUG> dstat.c:278:addDir(): testDir returned TRUE to addDir
<DEBUG> dstat.c:200:createDirNode(): /usr
<DEBUG> dstat.c:280:addDir(): addDir /usr
<DEBUG> dstat.c:285:addDir(): num_dirs: 1
<DEBUG> dstat.c:694:main(): loop: 01: param_index = 2, dir_cnt = 1
<DEBUG> dstat.c:250:testDir(): user: /tmp
<DEBUG> dstat.c:260:testDir(): TRUE 2
<DEBUG> dstat.c:278:addDir(): testDir returned TRUE to addDir
<DEBUG> dstat.c:200:createDirNode(): /tmp
<DEBUG> dstat.c:280:addDir(): addDir /tmp
<DEBUG> dstat.c:285:addDir(): num_dirs: 2
<DEBUG> dstat.c:694:main(): loop: 02: param_index = 3, dir_cnt = 2
<DEBUG> dstat.c:250:testDir(): user: /var
<DEBUG> dstat.c:260:testDir(): TRUE 3
<DEBUG> dstat.c:278:addDir(): testDir returned TRUE to addDir
<DEBUG> dstat.c:200:createDirNode(): /var
<DEBUG> dstat.c:280:addDir(): addDir /var
<DEBUG> dstat.c:285:addDir(): num_dirs: 3
<DEBUG> dstat.c:694:main(): loop: 03: param_index = 4, dir_cnt = 3
<DEBUG> dstat.c:250:testDir(): user: /etc
<DEBUG> dstat.c:260:testDir(): TRUE 4
<DEBUG> dstat.c:278:addDir(): testDir returned TRUE to addDir
<DEBUG> dstat.c:200:createDirNode(): /etc
<DEBUG> dstat.c:280:addDir(): addDir /etc
<DEBUG> dstat.c:285:addDir(): num_dirs: 4
<DEBUG> dstat.c:705:main(): dir_cnt: 4
<DEBUG> dstat.c:221:checkUniqueDirs(): dir[0]: /etc
<DEBUG> dstat.c:221:checkUniqueDirs(): dir[1]: /var
<DEBUG> dstat.c:221:checkUniqueDirs(): dir[2]: /tmp
<DEBUG> dstat.c:221:checkUniqueDirs(): dir[3]: /usr
Abort
[ wgd@LIGETI Lo 65F8BE5B Git github.com:ASCCON DStat://DStat "main" ]
$