terrychou / iVim

A vim port to iOS.
599 stars 34 forks source link

File copy failing in Files app #96

Open ericweir opened 4 years ago

ericweir commented 4 years ago

I have been trying to copy my iVim-related files via the Files app to a Dropbox folder so I can access them from both iVim and MacVim. A folder of ten files transferred easily, but a Vimwiki folder of 227 files repeatedly fails to copy all files, stopping after 100 or so.

Perhaps unrelated but puzzling is a discrepancy in the number of files reported in this folder. Before entering the folder Files indicates that it contains 341 files. But when I enter the folder and scroll to the bottom of the file list Files reports only 227 files. A similar discrepancy is found in a sub folder of the Vimwiki folder.

Insights and suggestions appreciated.

terrychou commented 4 years ago
  1. the number restriction of file copying issue

I don't really know the reason of this issue. But it probably comes from the Files.app, since what iVim does here is just exposing its Documents folder to the Files.app, without enforcing any limitation on it.

One better way I would suggest is that you can make an archive tarball (e.g. via the command tar) of all the files before copying. Then copying this one tarball file would be much easier.

  1. the discrepancy of file numbers issue

This is about the dotfiles (files whose names start with .). The Files.app hides dotfiles from the users. However, while the files number it reports from outside a folder would include the dotfiles, it is excluded from the number shown inside the folder.

Moreover, it would not copy the contained dotfiles if you copy a folder within the Files.app. As a result, it would not be a good way to simply copy the folder for your Vimwiki project. The tarball way mentioned above would be better since it also avoids this problem.

ericweir commented 4 years ago

Thanks very much, Terry. I was aware that this was almost certainly a problem associated with the Files app, not iVim. Just thought some iVim users might have encountered it and have suggestions/solutions/workarounds to offer.

Thanks too for the explanation of the discrepancy in numbers of files. And especially for the tarball suggestion. I’ll give it a try.

On Mar 13, 2020, at 10:05 PM, Terry Chou notifications@github.com wrote:

• the number restriction of file copying issue I don't really know the reason of this issue. But it probably comes from the Files.app, since what iVim does here is just exposing its Documents folder to the Files.app, without enforcing any limitation on it.

One better way I would suggest is that you can make an archive tarball (e.g. via the command tar) of all the files before copying. Then copying this one tarball file would be much easier.

• the discrepancy of file numbers issue This is about the dotfiles (files whose names start with .). The Files.app hides dotfiles from the users. However, while the files number it reports from outside a folder would include the dotfiles, it is excluded from the number shown inside the folder.

Moreover, it would not copy the contained dotfiles if you copy a folder within the Files.app. As a result, it would not be a good way to simply copy the folder for your Vimwiki project. The tarball way mentioned above would be better since it also avoids this problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.