Fix tutorial error
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 11 Dec 2015 01:36:47 +0000 (10:36 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 11 Dec 2015 01:36:47 +0000 (10:36 +0900)
Change-Id: I183cda3c2531f9afefe83b6323723c2e08e23c78
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
org.tizen.tutorials/html/native/multimedia/metadata_editor_tutorial_n.htm

index 41f4634..0e0157f 100644 (file)
@@ -125,7 +125,7 @@ _get_internal_storage_path()
 
 &nbsp;&nbsp;&nbsp;error = storage_foreach_device_supported(storage_cb, NULL);
 &nbsp;&nbsp;&nbsp;error = storage_get_directory(internal_storage_id, STORAGE_DIRECTORY_MUSIC, &amp;path);
-&nbsp;&nbsp;&nbsp;if (error != STORAGE_ERROR_NONE)
+&nbsp;&nbsp;&nbsp;if (error == STORAGE_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;internal_music_storage_path = strdup(path);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(path);
@@ -137,12 +137,11 @@ _make_test_path()
 {
 &nbsp;&nbsp;&nbsp;int path_len = 0;
 
-&nbsp;&nbsp;&nbsp;path_len = strlen(internal_music_storage_path) + strlen(music_file_name) + 1;
+&nbsp;&nbsp;&nbsp;path_len = strlen(internal_music_storage_path) + strlen(music_file_name) + 2;
 &nbsp;&nbsp;&nbsp;music_test_path = malloc(path_len);
 &nbsp;&nbsp;&nbsp;memset(music_test_path, 0x0, path_len);
 
-&nbsp;&nbsp;&nbsp;strncat(music_test_path, internal_music_storage_path, strlen(internal_music_storage_path));
-&nbsp;&nbsp;&nbsp;strncat(music_test_path, music_file_name, strlen(music_file_name));
+&nbsp;&nbsp;&nbsp;snprintf(music_test_path, path_len, "%s/%s", internal_music_storage_path, music_file_name);
 }
 </pre>