Closed sc420 closed 8 months ago
Are you on a 32 bit system maybe? And what version of linux (uname -a
)?
Also, are you able to compile this project yourself? If so, can you change this line to use isize::MAX
and see if that fixes things?
https://github.com/SUPERCILEX/fuc/blob/66d5296b858bb238f1ca7fad958075f97bbac0ac/fuc_engine/src/ops/copy.rs#L401
My uname -a outputs Linux hostname 4.14.78-9.x86_64 #18 SMP Tue Feb 2 07:46:57 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
, so it's a 64 bit system.
When building the cpz I encountered some error, but the error is gone after I changed isize::MAX
to usize::MAX
on line 401 based on your suggestion, and then the build was successful.
But the compiled program still has trouble copying the simple directory:
user@hostname:~/scratch/github/fuc/target/debug$ ./cpz test test2
Error: An I/O error occurred
├╴at cpz/src/main.rs:70:18
│
╰─▶ Invalid argument (os error 22)
├╴at cpz/src/main.rs:68:45
╰╴Failed to copy file: "test/abc.txt"
Oh wait sorry, I forgot that the types won't be compatible. Do usize::MAX / 2
instead.
It worked! Will this fix be in the new version?
Do you want to submit a PR? :grin: Otherwise no worries I can do it.
oh sure, if the fix is that simple and OS independent
I encountered the following error when copying a directory that contains only a text file. I'm using CentOS 7.5.
rmz
works just fine.