8000 Delete files dead · Issue #5 · reindahl/jmtp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Delete files dead #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aliujb opened this issue Sep 8, 2020 · 1 comment
Open

Delete files dead #5

aliujb opened this issue Sep 8, 2020 · 1 comment

Comments

@aliujb
Copy link
aliujb commented Sep 8, 2020

When a file is deleted and then added, a zombie situation occurs,don't know why?
The code is as follows:

public void addFile(File file, String mtpPath) throws FileNotFoundException, IOException, COMException {
deleteFile(file.getName(), mtpPath);
String lastpartofpath = mtpPath.substring(mtpPath.lastIndexOf("\") + 1);
PortableDeviceStorageObject storage = getStorage();
PortableDeviceFolderObject folder = MTPUtil.createFolder(mtpPath, storage, null, lastpartofpath);
PortableDeviceAudioObject object = folder.addAudioObject(file, "--", "--", new BigInteger("0"));
//LogUtil.debugPrint(LogUtil.LOG_LEVEL_LESS, this.getClass().getSimpleName(), "Copied " + file.getAbsolutePath() + " to " +
mtpPath
// + " on " + getDevice().getModel());
}

The zombie code is 212 lines in the PortableDeviceImplWin32 class :
PortableDeviceContentImplWin32 content = this.getDeviceContent();

@SongJiaxin95
Copy link

Me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0