Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the path is an absolute path, it cannot be detected #602

Open
parlay96 opened this issue Jul 26, 2023 · 6 comments
Open

If the path is an absolute path, it cannot be detected #602

parlay96 opened this issue Jul 26, 2023 · 6 comments

Comments

@parlay96
Copy link

image

'./src', If the path is the latter, it cannot be detected: // path.join(__dirname, './src')

@parlay96
Copy link
Author

Seeking answers to urgent questions, Thank you

@kucherenko
Copy link
Owner

Hi, it is hard to debug just with the screenshot.

__dirname is a current folder, are you sure that the second path exists?

@parlay96
Copy link
Author

image
Of course there is, But I have already discovered the problem, it is the problem with the JSCPD code

@parlay96
Copy link
Author

path.join(directory, './src').replace(/\/g, '/'), I must convert my path, Because the default format in the jscpd source code is mac, and the path. coin path of win is d: yp mini jx\

@parlay96
Copy link
Author

image
In the jscpd code, there is no judgment on Windows

@parlay96
Copy link
Author

image
This is the correct approach, under Windows

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

No branches or pull requests

2 participants