Comments (7)
I'm a bit confused.
From the provided logs, it seems that there's just an issue with obtaining the creation time of a file - it's part of the Rust std::fs::Metadata
struct, provided when calling the std::fs::metadata()
function, but Yazi doesn't actually use the created
field throughout the entire copying process, so this shouldn't cause the copy to fail.
Also this is a retry log, not a final failure log. If a copy task were to fail, it would be logged with "Failed to work on this task" at the beginning rather than "Paste task retry".
Using last modification time (mtime) instead as it is more widely supported across filesystems.
Yazi hasn't changed (even used) the creation time during the entire copy process, so I'm not sure what can be done here.
from yazi.
I'll add more logs.
Output of mount
(relevant lines)
[piroro@pc ~]$ mount
/dev/nvme0n1p2 on / type f2fs (rw,noatime,lazytime,background_gc=on,gc_merge,nodiscard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,barrier,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,checkpoint_merge,fsync_mode=posix,atgc,memory=normal,errors=continue)
systemd-1 on /run/media/system/USB_Flash_Disk type autofs (rw,relatime,fd=102,pgrp=1,timeout=1,minproto=5,maxproto=5,direct,pipe_ino=116355)
/dev/sda1 on /run/media/system/USB_Flash_Disk type exfat (rw,noatime,lazytime,fmask=0000,dmask=0000,allow_utime=0022,iocharset=utf8,errors=remount-ro)
Create test file on home (f2fs)
echo test > ~/test
Open Yazi, yank ~/test
, and then paste it inside /run/media/system/USB_Flash_Disk
(exFAT)
Below is a output of task inspection (however, task inspection screen is closed immediately, maybe another issue)
Paste task retry: FileOpPaste { id: 16, from: /home/piroro/test, to: /run/media/system/USB_Flash_Disk/test, meta: Some(Metadata { file_type: FileType(FileType { mode: 33188 }), is_dir: false, is_file: true, permissions: Permissions(FilePermissions { mode: 33188 }), modified: Ok(SystemTime { tv_sec: 1715964300, tv_nsec: 510034975 }), accessed: Ok(SystemTime { tv_sec: 1715964096, tv_nsec: 758899868 }), created: Err(Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }), .. }), cut: false, follow: false, retry: 1 }
Paste task retry: FileOpPaste { id: 16, from: /home/piroro/test, to: /run/media/system/USB_Flash_Disk/test, meta: Some(Metadata { file_type: FileType(FileType { mode: 33188 }), is_dir: false, is_file: true, permissions: Permissions(FilePermissions { mode: 33188 }), modified: Ok(SystemTime { tv_sec: 1715964300, tv_nsec: 510034975 }), accessed: Ok(SystemTime { tv_sec: 1715964096, tv_nsec: 758899868 }), created: Err(Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }), .. }), cut: false, follow: false, retry: 2 }
Paste task retry: FileOpPaste { id: 16, from: /home/piroro/test, to: /run/media/system/USB_Flash_Disk/test, meta: Some(Metadata { file_type: FileType(FileType { mode: 33188 }), is_dir: false, is_file: true, permissions: Permissions(FilePermissions { mode: 33188 }), modified: Ok(SystemTime { tv_sec: 1715964300, tv_nsec: 510034975 }), accessed: Ok(SystemTime { tv_sec: 1715964096, tv_nsec: 758899868 }), created: Err(Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }), .. }), cut: false, follow: false, retry: 3 }
Paste task retry: FileOpPaste { id: 16, from: /home/piroro/test, to: /run/media/system/USB_Flash_Disk/test, meta: Some(Metadata { file_type: FileType(FileType { mode: 33188 }), is_dir: false, is_file: true, permissions: Permissions(FilePermissions { mode: 33188 }), modified: Ok(SystemTime { tv_sec: 1715964300, tv_nsec: 510034975 }), accessed: Ok(SystemTime { tv_sec: 1715964096, tv_nsec: 758899868 }), created: Err(Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }), .. }), cut: false, follow: false, retry: 4 }
Paste task retry: FileOpPaste { id: 16, from: /home/piroro/test, to: /run/media/system/USB_Flash_Disk/test, meta: Some(Metadata { file_type: FileType(FileType { mode: 33188 }), is_dir: false, is_file: true, permissions: Permissions(FilePermissions { mode: 33188 }), modified: Ok(SystemTime { tv_sec: 1715964300, tv_nsec: 510034975 }), accessed: Ok(SystemTime { tv_sec: 1715964096, tv_nsec: 758899868 }), created: Err(Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }), .. }), cut: false, follow: false, retry: 5 }
Failed to work on this task: Operation not permitted (os error 1)
Actually, zero-sized file /run/media/system/USB_Flash_Disk/test
is created.
from yazi.
Ah, sorry I misunderstood the log.
It failed because of Operation not permitted (os error 1)
?
Here is output of ls -la /run/media/system/USB_Flash_Disk
, if relevant
[piroro@pc USB_Flash_Disk]$ ls -la
total 58658816
drwxrwxrwx 4 root root 131072 5月 18 01:45 .
drwxr-xr-x 3 root root 60 5月 17 23:08 ..
drwxrwxrwx 4 root root 131072 5月 18 01:45 .Trash-1000
-rwxrwxrwx 1 root root 0 5月 18 01:45 50-router-workaround.old
-rwxrwxrwx 1 root root 6447361032 5月 18 01:31 AZUNA_LAGOON_day2.mp4
drwxrwxrwx 2 root root 131072 5月 4 23:39 'System Volume Information'
-rwxrwxrwx 1 root root 2451804820 5月 10 2022 dob_1st_day2.m2ts
-rwxrwxrwx 1 root root 1014660314 5月 3 13:03 dob_2nd_yoru.webm
-rwxrwxrwx 1 root root 18549408027 5月 18 00:34 dob_ULTRA_EXPO_2024.mp4
-rwxrwxrwx 1 root root 11198399861 11月 25 02:18 hasu_1st_tyo_day2.mp4
-rwxrwxrwx 1 root root 12439120391 5月 18 00:56 hasu_2nd_chiba_day2.mp4
-rwxrwxrwx 1 root root 5958190785 5月 18 01:22 hasu_debut.webm
-rwxrwxrwx 1 root root 2006789842 5月 18 01:10 hasu_opening_hiru.mp4
-rwxrwxrwx 1 root root 0 5月 18 01:45 test
from yazi.
Yes, this is the real reason for the failure.
Unfortunately, I don't think there's anything Yazi can do here - this error is returned by the operating system and Yazi simply calls std::fs::copy()
. You need to ensure that the Yazi process has the right permission to write files to USB.
from yazi.
OK, creating small program using std::fs::copy
and strace
ing reveals that failure is happening at changing file permission (fchmod
) in std::fs::copy
, as created file on USB stick is owned by root. cp
command can handle this case so it would be great if some kind of fallback is implemented in yazi.
from yazi.
I'm not sure about the specific cause of the issue you encountered, but I believe it's largely related to correct permission settings. I didn't encounter any problems in my testing with an ExFAT USB; all files were successfully copied:
screenshot-000009.mp4
Don't get me wrong - I don't mind adding additional fallback if it suits your use case and I'd be happy to accept a PR for it. Since I couldn't replicate the issue, it's difficult to pinpoint.
from yazi.
I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
from yazi.
Related Issues (20)
- Exit select mode after finishing renaming the files. HOT 4
- DDS static messages only work when at least two instances of Yazi are running HOT 2
- Child process hangs waiting for EOF (end fo file) when using `stdin(Command.PIPED)` HOT 2
- Extract plugin fails to work on encrypted rar and zip archives HOT 4
- Opening multiple files only hovers the first file, others are directories HOT 2
- [RFC] Replace package manager URL from `yazi-rs/plugins#full-border` to `yazi-rs/plugins:full-border` HOT 10
- view files in /proc HOT 9
- [RFC] refactor and improve shell options HOT 1
- `cd --interactive` - some dirs/files icons are small until hovered HOT 6
- Add IF patched fonts HOT 1
- parquet HOT 1
- Moving folder into itself causes frozen task HOT 3
- Glob pattern matching also includes children in filetype rules HOT 4
- Insert keymap doesnt work HOT 7
- Multiple Keymap Actions result in erroneous behaviour. HOT 1
- Export list of key bindings
- Wrong behavior on opening file that contains space on Windows HOT 1
- Plugins like zoxide don't seem to work HOT 4
- Compilation issues while building from source HOT 3
- Yazi gets stuck when hovering over a specific text file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yazi.