Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

bug in method findRoot #423

Open
zhangaz1 opened this issue Jan 19, 2015 · 3 comments
Open

bug in method findRoot #423

zhangaz1 opened this issue Jan 19, 2015 · 3 comments

Comments

@zhangaz1
Copy link

case ignor

此处可以统一转成大写或小写在做对比,不然有可能因为大小写不匹配死循环,我为这个问题浪费了半天时间,还以为不支持'./another.js'引用呢,差点就放弃duo了

@stephenmathieson
Copy link
Contributor

english? i don't think any of @duojs/owners speak chinese

@zhangaz1
Copy link
Author

1:
root = 'e:\temp';
path = 'e:\Temp\main.js';
then the while loop will endless when path = 'e:',
because: 'e:\temp' != 'e:\Temp'
so: should Ignore path insensitive.

2:
root = 'e:\temp';
path = 'e:\temp\main.js';
then the while loop will endless when path = 'e:',
because: 'e:\temp' != 'e:\temp'
so: should consider the path end of "" or not.

3:
better check the path value Inside the loop, when path === dirname (path) throw an excpetion. otherwise it will endless.

~~my poor english(60% by http://fanyi.baidu.com/translate), I hope you can understand.

@stephenmathieson
Copy link
Contributor

i will try to reproduce this bug, but am worried about the implications on case sensitive systems (unix).

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

2 participants