• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修訂9e28c5448b0e8adca9b2061496e313d8d9ce4634 (tree)
時間2019-05-24 20:27:10
作者Narayan Kamath <narayan@goog...>
Commiterandroid-build-merger

Log Message

rootdir / sdcard : Stop creating /data/media/obb.
am: c6ca823710

Change-Id: I429eacda7dc48b7472814dcecf58e1c7262b37fa

Change Summary

差異

--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -586,7 +586,6 @@ on post-fs-data
586586 symlink /data/data /data/user/0
587587
588588 mkdir /data/media 0770 media_rw media_rw
589- mkdir /data/media/obb 0770 media_rw media_rw
590589
591590 mkdir /data/cache 0770 system cache
592591 mkdir /data/cache/recovery 0770 system cache
--- a/sdcard/sdcard.cpp
+++ b/sdcard/sdcard.cpp
@@ -214,7 +214,14 @@ static void run_sdcardfs(const std::string& source_path, const std::string& labe
214214
215215 if (multi_user) {
216216 std::string obb_path = source_path + "/obb";
217- fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
217+ // Only attempt to prepare the /obb dir if it already exists. We want
218+ // the legacy obb path "/data/media/obb" to be fixed up so that we can
219+ // migrate it to its new location, but we don't want the directory to be
220+ // created if it doesn't already exist.
221+ struct stat sb;
222+ if (TEMP_FAILURE_RETRY(lstat(obb_path.c_str(), &sb)) == 0) {
223+ fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
224+ }
218225 }
219226
220227 exit(0);