Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

bin/jsctags directory recursion does not work on windows #15

Open
clausreinke opened this issue Sep 3, 2011 · 2 comments
Open

bin/jsctags directory recursion does not work on windows #15

clausreinke opened this issue Sep 3, 2011 · 2 comments

Comments

@clausreinke
Copy link

processPath uses fs.statSync's st.ino to avoid looping. That component tends to be zero on windows, so recursive processing stops as all paths look the same to idFor.

workaround 1 (might loop): don't check for link cycles

    var id = 'path:'+p; // idFor(st); // ino always zero?

workaround 2 (requires hacking): try using FileIndex from [GetFileInformationByHandle](http://msdn.microsoft.com/en-us/library/aa363788(v=vs.85\).aspx)

GetFileInformationByHandle() is the Win32 equivalent for the _fstat() C Run-time function.
Win32 Equivalents for C Run-Time Functions

Further info:

The inode, and therefore st_ino, has no meaning in the FAT, HPFS, or NTFS file systems.
[_stat, _wstat Functions](http://msdn.microsoft.com/de-de/library/14h5k7ff(VS.90\).aspx)

jsctags should be able to generate tags for itself. I had to check the sources to figure out how that is supposed to work, and why it doesn't work on windows atm (there is also a line ending problem, and bin/jsctags will not be processed at all due to lack of .js ending). It appears that noone is using jsctags on windows?

@clausreinke
Copy link
Author

idFor is used for other purposes in bin/jsctags, also affected by that issue.

@clausreinke
Copy link
Author

There is a patch for this issue here. It also removes a case of path handling that doesn't work on windows, and ensures that files named on the command line are processed, irrespective of ending.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant