Skip to content

Commit

Permalink
修复百度云分享链接单个媒体文件无法获取选择文件bug
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Apr 11, 2018
1 parent a9faed5 commit 0c9cfa8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sniff/src/main/resources/hookjs/bdyHook.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//1.6
//1.7
var initHookInterval = setInterval(function () {
if (!window.$) {
return;
Expand Down Expand Up @@ -897,8 +897,13 @@ var initHookInterval = setInterval(function () {
}
});
} else {
var fileInfo = yunData.FILEINFO[0];
if (yunData.FILEINFO.length == 1 && fileInfo.isdir == 0) {
var fileInfo = yunData.FILEINFO[0] || {
server_filename: yunData.FILENAME,
path: yunData.PATH,
fs_id: yunData.FS_ID,
isdir: 0
};
if (yunData.FILEINFO.length <= 1 && fileInfo.isdir == 0) {
selectFileList.push({
filename: fileInfo.server_filename,
path: fileInfo.path,
Expand Down

0 comments on commit 0c9cfa8

Please sign in to comment.