Comments (12)
When listFiles function do after the createDirectory, sometimes listFiles is not 0.
UsbFile currentUsbFile = getRootDirectory();
UsbFile usbFile = currentUsbFile.createDirectory(name);
UsbFile[] usbFiles = nextUsbFile.listFiles();
if (usbFiles != null && usbFiles.length > 0) {
Timber.e("createDirectory: usbfile[%d]", usbFiles.length);
}
from libaums.
Hey,
thanks for reporting. Currently I am pretty busy, thus I cannot say when I can have a look at this.
from libaums.
I tried the following in the Mac PC and Windows PC.
- USB device attach to PC
- USB device detach from PC use eject function.
- USB device attach to Android
- createDirectory function do.
When attach to Mac PC createDirectory function sometimes create that cannot be deleted.
But When attach to Windows PC createDirectory function did not create that cannot be deleted.
It might have occurred from usb storage mount to mac pc.
from libaums.
It is seem that FatDirectory class createDirectory function read dirty memory.
createDirectory function result.entries.size() is two. result.entries is "." and "..".
But sometime result.entries.size() over 2 after result.write().
write() is init() at first.
private void init() throws IOException {
if (chain == null) {
chain = new ClusterChain(entry.getStartCluster(), blockDevice, fat, bootSector);
readEntries();
}
}
Is is createDirectory function's "result" is chain = null, So readEntries do.
I thinkk that When readEntries read dirty memory, volume label Log or addEntry is happend.
from libaums.
Should be fixed in current develop, please review and reopen this issue if not.
from libaums.
createDirectory function only do in root directory.
1.USB device attach to mac
2.USB device detach from mac use eject function.
3.USB device attach to Android
4.createDirectory function do in root directory (ex [root directory]/a)
5.USB device detach from Android
6.USB device attach to mac
7.ls command do.
The following problems are occurring often.
No.1 not find "." and ".." file.
$ ls -la /Volumes/USBSTORAGE/a/
No.2 create file.
$ ls -la /Volumes/USBSTORAGE/b/
ls: BF0541E4.-06: Input/output error
ls: E8DC␀␀␀␀.␀␀␀: No such file or directory
No.3 ".." time is error.
$ ls -la /Volumes/USBSTORAGE/h/
total 64
drwxrwxrwx 1 yamamoto staff 16384 3 22 20:12 .
drwxrwxrwx@ 1 yamamoto staff 16384 1 1 1970 ..
When createDirectory function do in not root directory , It seems not to occur
ex. [root directory]/a/b seems not to occur.
[root directory]/a is occur.
After createDirectory function do, It click createDirectory.
When show createDirectory, It seems not to occur No.1 and No2.
from libaums.
Can you reproduce this behaviour with the example app included in the repository?
from libaums.
I use Usbfileman at developer brunch.
When only createDirectory do in root directory, problems are occurring often.
My application is copy file after createDirectory function.
It seems not to occur after #18.
from libaums.
Okay I can reproduce No. 3 now.
For the others did you try a different Android device and did you ensure waiting enough time after detaching from the Android device (so data was actually written completely)?
from libaums.
I was testing with Nexus5.
When I change device to Nexus6, problems are occurring.
When I change UsbMassStorage, I can reproduce only No.3.
The cause of No.1 and No.2 may be USB storage.
from libaums.
Okay I currently do not know why no. 3 is happening, but I will have a look asap.
Which of the flash drives is making problems? (iXpand Flash Drive 32GB or SanDisk Ultra USB 3.0 16GB?)
from libaums.
iXpand Flash Drive 32GB is making problems.
from libaums.
Related Issues (20)
- GettingMissing permission to access usb device . HOT 1
- An error was encountered when calling the UsbMassStorageDevice#init method HOT 2
- Very low copy speed HOT 3
- IOException: unsupported PeripheralQualifier or PeripheralDeviceType HOT 1
- getting issue while building CMakeList.txt HOT 1
- Brilliant project!but is it possible that in the future there will be a package for the java-fs module available on Maven Central?
- new UsbFileWrapper in javafs cost too much time HOT 4
- Why does mass storage send a 16k data packet into multiple data packets? HOT 3
- Calling device.init() eject the device HOT 1
- Cannot read a UsbFile content HOT 3
- Potential bug in ScsiBlockDevice.requestSense() HOT 2
- [Enhancement] Add infrastructure for testing the low-level SCSI driver HOT 2
- [Bug report]Fat32 file size is not the real size could raise Error
- Play Music From USB Pendrive HOT 2
- why sometimes blockDevice.init() is ok sometimes time out ,the scsi command init not stable
- Could not read from device, result == -1 errno 0 null HOT 1
- 为什么读取NTFS、exFAT文件系统的SD卡数据很慢?读取FAT32就很快? HOT 4
- UsbMassStorageDeivce.init() throw exception HOT 1
- add libusb files in the project
- Could not create file and directory on usb storage formated by exfat while running app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libaums.