Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

removeFile没有把文件真正从queue中remove掉? #594

Open
zxlie opened this issue Nov 14, 2014 · 5 comments
Open

removeFile没有把文件真正从queue中remove掉? #594

zxlie opened this issue Nov 14, 2014 · 5 comments

Comments

@zxlie
Copy link

zxlie commented Nov 14, 2014

实测,需要在removeFile方法中加点儿东西:

    /**
     * 在队列中删除文件。
     * @grammar removeFile( file ) => Array
     * @method removeFile
     * @param {File} 文件对象。
     */
    removeFile: function( file ) {
        var me = this,
            existing = this._map[ file.id ];

        if ( existing ) {
            delete this._map[ file.id ];
            for(var i = 0,len = this._queue.length;i < len;i++){
                var f = this._queue[i];
                if(f.id == file.id){
                   this._queue.splice(i,1);
                    break;
                }
            }
            file.destroy();
            this.stats.numofDeleted++;
        }
    }
@ghost
Copy link

ghost commented Apr 28, 2015

呃,确实,收下了,多谢。

@AnYaran
Copy link

AnYaran commented Dec 3, 2015

确实是对的

@ybning
Copy link

ybning commented Apr 1, 2016

测试确实如此

@Webdiyer
Copy link

Webdiyer commented May 4, 2017

真是个坑啊,这个问题现在还在,没人维护了吗?

@LSL1618
Copy link

LSL1618 commented May 9, 2017

@Webdiyer ,估计是没人管了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants