-
Notifications
You must be signed in to change notification settings - Fork 12k
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
'move' incorrect files name (angular_devkit/schematics/src/rules/move.ts) #13654
Comments
@seneric, I tried to replicate the issue, and it seems that during the rename the slashes are normalised and deduped properly. Infact trying to run the test you provided passes using the current master. Maybe you can explain what is the problem that you are experiencing? That said, in the line you mentioned we should probably use |
when you try use move('/myApp', '/') and debug the code when you spy what is contains in toPath + '/' + path.substr(fromPath.length) you have /// at the begining of the string (and it is not 'clean'). |
…concatenation This leads to cleaner paths while debugging Fixes #13654
…concatenation This leads to cleaner paths while debugging Fixes #13654
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Description
For example when you try use move('/myApp', '/')
at line 33 : tree.rename(path, toPath + '/' + path.substr(fromPath.length));
toPath + '/' + path.substr(fromPath.length) all files contain '///' before there name.
🔬 Minimal Reproduction
tree.create('a/b/file1', 'hello world');
move('a/b', '/') => file name is ///file1
A possible correction:
I replaced line 33:
tree.rename(path, toPath + '/' + path.substr(fromPath.length));
by
test file:
🌍 Your Environment
The text was updated successfully, but these errors were encountered: