Git Product home page Git Product logo

Comments (7)

sxyazi avatar sxyazi commented on August 16, 2024

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.

Piroro-hs avatar Piroro-hs commented on August 16, 2024

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.

Piroro-hs avatar Piroro-hs commented on August 16, 2024

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.

sxyazi avatar sxyazi commented on August 16, 2024

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.

Piroro-hs avatar Piroro-hs commented on August 16, 2024

OK, creating small program using std::fs::copy and straceing 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.

sxyazi avatar sxyazi commented on August 16, 2024

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.

github-actions avatar github-actions commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.