Skip to content
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

缓存目录和缓存文件路径写错了 #9

Closed
pardonhan opened this issue Sep 28, 2017 · 1 comment
Closed

缓存目录和缓存文件路径写错了 #9

pardonhan opened this issue Sep 28, 2017 · 1 comment

Comments

@pardonhan
Copy link

作者代码里缓存目录写了007,但是缓存文件路径却写了10086
这导致了 open failed: ENOENT (No such file or directory)

    /***
     * 获取缓存目录
     *
     * @param url
     * @return
     */
    private File getCacheDir(String url) {

        return new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/007/");

    }
    /***
     * 绝对路径获取缓存文件
     *
     * @param url
     * @return
     */
    private File getCacheFile(String url) {
        File cacheFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/10086/"
                + getFileName(url));
        TLog.d(TAG, "缓存文件 = " + cacheFile.toString());
        return cacheFile;
    }
@ZhongXiaoHong
Copy link
Owner

@pardonhan 谢谢提醒 我粗心了 已改正

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