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

Can't move a file between drives while getting content from AEM #3

Closed
toniedzwiedz opened this issue Jul 7, 2021 · 1 comment
Closed
Assignees

Comments

@toniedzwiedz
Copy link

I'm using je with IntelliJ on Windows 10 and I'm having a hard time getting a file from CRX when working with a project checked out on a drive different from the one where IntelliJ and je are installed.

 DEBUG je::fsops  > writing cleaned lines back to file
 INFO  je::fsops  > moving files from C:\Users\TOMASZ~1.NIE\AppData\Local\Temp\.tmp0DKhrP\jcr_root\apps\bazbaz\components\xyz\.content.xml to Z:\home\tomasz_niedzwiedz\repos\foo\foo-aaa-aem\bar-bar-bar\ui.apps\src\main\content\jcr_root\apps\bazbaz\components\xyz\.content.xml
 DEBUG je::fsops  > files under C:\Users\TOMASZ~1.NIE\AppData\Local\Temp\.tmp0DKhrP\jcr_root\apps\bazbaz\components\xyz\.content.xml:
 DEBUG je::fsops  > 	- C:\Users\TOMASZ~1.NIE\AppData\Local\Temp\.tmp0DKhrP\jcr_root\apps\bazbaz\components\xyz\.content.xml
Error: The system cannot move the file to a different disk drive. (os error 17)

It appears to be caused by the fs:rename method being used in fsops.rs

On Windows, https://doc.rust-lang.org/std/fs/fn.rename.html uses MoveFileEx internally. MoveFileEx does allow a flag to be set, which permits moving between drives, but this isn't something I can control through flags or variables when calling je.

Consider changing the way files are moved so that it's easier to work with multiple drives.

@toniedzwiedz toniedzwiedz changed the title Can't move a file between drives while pushing Can't move a file between drives while getting content from AEM Jul 7, 2021
@devzbysiu devzbysiu self-assigned this Jul 7, 2021
@devzbysiu
Copy link
Owner

Fixed in a405d02 🙂 . Instead of std implementation I used fs_extra which was in a dependency tree anyway. Closing

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

No branches or pull requests

2 participants