Loading core/java/android/app/ActivityThread.java +18 −0 Original line number Diff line number Diff line Loading @@ -7395,6 +7395,24 @@ public final class ActivityThread extends ClientTransactionHandler { super.remove(path); } } @Override public void rename(String oldPath, String newPath) throws ErrnoException { try { super.rename(oldPath, newPath); } catch (ErrnoException e) { if (e.errno == OsConstants.EXDEV && oldPath.startsWith("/storage/")) { Log.v(TAG, "Recovering failed rename " + oldPath + " to " + newPath); try { Files.move(new File(oldPath).toPath(), new File(newPath).toPath()); } catch (IOException e2) { throw e; } } else { throw e; } } } } public static void main(String[] args) { Loading Loading
core/java/android/app/ActivityThread.java +18 −0 Original line number Diff line number Diff line Loading @@ -7395,6 +7395,24 @@ public final class ActivityThread extends ClientTransactionHandler { super.remove(path); } } @Override public void rename(String oldPath, String newPath) throws ErrnoException { try { super.rename(oldPath, newPath); } catch (ErrnoException e) { if (e.errno == OsConstants.EXDEV && oldPath.startsWith("/storage/")) { Log.v(TAG, "Recovering failed rename " + oldPath + " to " + newPath); try { Files.move(new File(oldPath).toPath(), new File(newPath).toPath()); } catch (IOException e2) { throw e; } } else { throw e; } } } } public static void main(String[] args) { Loading