tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path seen in . and .. on samsung


From: Dan Jacobson
Subject: Re: Path seen in . and .. on samsung
Date: Wed, 03 Aug 2022 05:54:51 -0500

Asus, Android 8, no problem.
Samsung, Android 12, yes problem.

$ EMACSLOADPATH=~/.emacs_/tramp/lisp/: /usr/bin/emacs -Q /adb::/sdcard/

  /adb::/sdcard:
  total used in directory 61 available 35.5 GiB
  drwxrwx---  1 root everybody 3452 07-06 17:15 .face
  drwxrwx---  1 root everybody 3452 08-03 03:18 /sdcard/.
  drwx--x--x  1 root everybody 3452 07-07 08:48 /sdcard/..
  drwxrwx---  1 root everybody 3452 07-06 17:14 Alarms
  -rw-rw----  1 root everybody    0 08-03 03:18 file\\ with\\ spaces\\ in\\ name
  drwxrwx---  1 root everybody 3452 08-03 04:35 jidanni
  drwxrwx---  1 root everybody 3452 08-02 16:57 osmtracker

tramp-version is a variable defined in ‘tramp-cmds.el’.
Its value is "2.5.3"

05:24:49.738112 tramp-adb-send-command (6) # ls -1 -d -a -l /sdcard/jidanni/. 
/sdcard/jidanni/..
05:24:49.780862 tramp-wait-for-regexp (6) # 
ls -1 -d -a -l /sdcard/jidanni/. /sdcard/jidanni/..
drwxrwx---  6 root everybody 3452 2022-08-03 04:35 /sdcard/jidanni/.
drwxrwx--- 19 root everybody 3452 2022-08-03 03:18 /sdcard/jidanni/..

$ adb shell ls --help
Toybox 0.8.4-android multicall binary: https://landley.net/toybox (see toybox 
--help)

usage: ls [-ACFHLRSZacdfhiklmnpqrstuwx1] [--color[=auto]] [FILE...]
...


Anyway, in your code,

                            (tramp-shell-quote-argument localname)))
             ;; We insert also filename/. and filename/.., because "ls" doesn't.
             ;; Looks like it does include them in toybox, since Android 6.
             (unless (re-search-backward "\\.$" nil t)
               (narrow-to-region (point-max) (point-max))


$ adb shell ls -a /sdcard/|fgrep .
.face

Anyway, so on this samsung with android 12, you get /sdcard/.. etc. but
you don't rewrite them back to .. etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]