This is not a actual micro sdcard. The android’s internal storage is just called sdcard. It isn’t an actual micro sd card. I dont have a micro sd card inserted into my galaxy s8
even then I’m using a webdav app it isn’t making temporary files on the phone and rewriting it back into fedora
Since the device is connected to the pc one could simply use the file manager to move the files. It only would need the phone to read the files and allow the transfer. Once the file is written to the pc it could be removed from the phone.
This could also be done from the command line very easily with the mv command, or a combination of cp & rm.
I’m trying to understand why it doesn’t work with a simple webdav app. I could’ve done this easily if I had some space but knowing that I barely have anything, even making a small zip containing one file is not possible because it would first need to be saved on the phone
Having only a tiny remaining space on the phone causes a problem since many apps require the use of ram or temporary file space to function. Clearing out some of that space with a tool that requires minimal extra space is mandatory and the webdav app seems to require more than would be necessary with the command line tools.
Start with the command line, then after some space is freed up it may be that your preferred app could manage the rest…
Tools that do not require space on the already full file system seem best for the task.
I am somewhat surprised that android allows the file system to fill up that much (99.6%) since linux normally reserves 5% to avoid those issues you are seeing.
I guess so…knowing that my pixel 7 has about 50 GB of storage remaining (while using the find and zip command works with the pixel 7) vs. 200 MB (fine and zip command doesn’t work here) or less on my galaxy s8…I’m not sure if that would be as big as a problem but let’s try to free up some space anyway
Yes my point exacly, if you are having the same problem creating a zip file from a simple file, there has to be something else that is the problem. Also, what are all those slashes for? Have you tested it on a webdav mount so any problems correlate as closely as possible to mine? if you use zip -r -0 (no compression) does it make a difference? Why does a buffer overflow get detected when u are just zipping one file? In the second example, you just copied and renamed the original source file am I correct? What is your working directory?
It’s simple: the file name is read in and the file is opened correctly in zip. Then the name gets processed somehow for storage in the zip file. Either the character set of the file name is not recognized properly, or the conversion fails somehow. So it’s a bug in zip or in the libraries called by zip, where the file is coming from is not important.
The backslashes are escape characters, file names with spaces have to be
“file with space”, ‘file with space’, or file\ with\ space.
I can create a simple zip file when im on local storage using both the find & zip command together if the source files are stored locally. The problem arises when source files are on webdav and then saving into local storage.
Zip treats white space as a break between file names, so it cannot find that file. The shell also treats the ' as a special character and expects a closing quote with it.
If one were to enclose the full file name with single quotes it might work since zip may then see the quoted name as a single file name. (I have not tested this)
White space and special characters have been avoided from the beginning in unix-like OSes since a white space has always been considered a file name break and command line word separators.
All one needs to do to recognize the difference is to use the ls command in a directory where some files have white space or special characters. Those file names will appear with quotes when they are displayed.
A partial explanation is shown here, but does not cover all cases with all apps.
edit:
I just tested with the file being zipped having white space in the name and enclosing the file name in single quotes and it worked.
$ zip add 'Band Chart 8_5 X 11 Color.pdf'
adding: Band Chart 8_5 X 11 Color.pdf (deflated 24%)
This created the file add.zip containing the named file.
$ zip add2 Band\ Chart\ 8_5\ X\ 11\ Color.pdf
adding: Band Chart 8_5 X 11 Color.pdf (deflated 24%)
This also worked with every special character escaped and created the file ‘add2.zip’.
Special characters include '(){}[],$;"\.? and the white space characters with some I am sure I missed.
I don’t think that is a bug since the shell interprets the single quote before it gets to zip. A single quote must be escaped before it is treated as a literal character.
okay it seems we are getting off-topic but are you guys saying the reason for the buffer overflow error is because there are unescaped white spaces or special characters in the filename ? How can you explain why a normal filename such as 20230531_215584.jpg not being zipped?
I don’t know. Do you have an example? Did you copy the file off the phone first, to narrow down the problem to zip and not something about gvfs or other factors?