Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSFileHandleOperationException - ResourceLoaderDelegate.writeBufferDataToFileIfNeeded() (ResourceLoaderDelegate.swift:187) #27

Open
JHeisecke opened this issue Jan 27, 2025 · 0 comments

Comments

@JHeisecke
Copy link

JHeisecke commented Jan 27, 2025

Hello,

My project uses this dependency and we have a crash happening when the device doesn't have enough space.

NSFileHandleOperationException - ResourceLoaderDelegate.writeBufferDataToFileIfNeeded() (ResourceLoaderDelegate.swift:187)
[NSConcreteFileHandle writeData:]: No space left on device

Version: 1.1.3

Is this issue fixed on later versions?

On the current version this would be happening here:

    private func writeBufferDataToFileIfNeeded(forced: Bool = false) {
        lock.lock()
        defer { lock.unlock() }

        guard bufferData.count >= downloadBufferLimit || forced else { return }

        fileHandle.append(data: bufferData)
        bufferData = Data()
    }

on fileHandle.append(data: bufferData)

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

No branches or pull requests

1 participant