To start, I created a video for my mod in the .bik format. The video plays in the editor and in game.
Regularly, video files are located in this path (inside Data\Localization\Video.pak):
Data\Localization\English\Video
Obviously that pathway doesn't quite work for mods, so I discovered that placing video files in this pathway worked:
Data\Mods\ModName_UUID\Localization\English\Video
The issue is when I go to publish my mod, I get these errors (in this exact order):
Failed to open file 'C:/Users/LL/Documents/Larian Studios/Divinity Original Sin 2/Local Mods/Mimicry_1e551d21-2e03-4ae9-a90a-9ad9cfe863cc_1e551d21-2e03-4ae9-a90a-9ad9cfe863cc.pak':
The process cannot access the file because it is being used by another process.
Category: Code
Count: 1
Timestamp: 02-07-2018 01:39:04:191
Function: ls::FileManager::DoOpenFile
Location: CoreLib\win32\Win32FileManager.cpp (110)
------------------------------------
Error reading 'Mods/Mimicry_1e551d21-2e03-4ae9-a90a-9ad9cfe863cc/Localization/English/Video/Mimicry_MusicBoxIntro.bik' from packed file!
Category: Code
Count: 1
Timestamp: 02-07-2018 01:39:04:191
Function: ls::PackedFile::ReadFileData
Location: CoreLib\PackedFile.cpp (791)
------------------------------------
Hashing of packed file 'C:/Users/LL/Documents/Larian Studios/Divinity Original Sin 2/Local Mods/Mimicry_1e551d21-2e03-4ae9-a90a-9ad9cfe863cc_1e551d21-2e03-4ae9-a90a-9ad9cfe863cc.pak' failed!
Category: Code
Count: 1
Timestamp: 02-07-2018 01:39:04:191
Function: ls::PackedFile::Save
Location: CoreLib\PackedFile.cpp (383)
After the errors, the mod pak remains "locked", and attempting to publish again crashes the error. A restart of the editor is needed to "release" the pak essentially.
Additionally, removing the video file allows the mod to be published without any errors.
To test things further, I removed my video and swapped it for "Splash_Logo_Larian.bk2". The same set of errors appeared when publishing. Next, I moved the file to my mod's Public/Assets folder (despite this not being a valid path for videos), and the same errors persisted.
So it seems like the bug is related to a video file being packaged in the mod, rather than the file itself.