Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Ignore unreadable files #57

@koppor

Description

@koppor

When I execute the script, I get following output

INFO:root:Scanning and diffing...
ls: /storage/emulated/0/Android/data/ch.threema.app/files/tmp//.nomedia: Operation not permitted
INFO:root:Total: 0 bytes

Would it be possible to skip read errors? Maybe "only" the "Operation not permitted" errors?


Details:

Traceback (most recent call last):
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 883, in <module>
    main()
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 874, in main
    syncer.ScanAndDiff()
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 515, in ScanAndDiff
    self.local_only, self.both, self.remote_only = DiffLists(
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 403, in DiffLists
    b_revlist = sorted(b)
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 370, in BuildFileList
    for t in BuildFileList(fs, path + b'/' + n, follow_links,
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 370, in BuildFileList
    for t in BuildFileList(fs, path + b'/' + n, follow_links,
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 370, in BuildFileList
    for t in BuildFileList(fs, path + b'/' + n, follow_links,
  [Previous line repeated 2 more times]
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 367, in BuildFileList
    for n in files:
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 247, in listdir
    yield filename
  File "/mnt/c/git-repositories/adb-sync/adb-sync", line 86, in __exit__
    raise OSError('Subprocess exited with nonzero status.')
OSError: Subprocess exited with nonzero status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions