Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b875be78

Přidáno uživatelem Vojtěch Bartička před téměř 3 roky(ů)

Fixed error in exported archive

Zobrazit rozdíly:

Backend/Backend/Controllers/DocumentController.cs
254 254
        }
255 255
        catch (InvalidOperationException e)
256 256
        {
257
            throw new BadRequestException("Could not find specified annotation");
257
            throw new BadRequestException("Could not find specified document");
258 258
        }
259 259

  
260 260
    }
Backend/Core/ZipUtils/Export.cs
16 16
            Dictionary<Annotation, List<AnnotationTag>> annotationTags, Dictionary<FinalAnnotation, List<FinalAnnotationTag>> finalAnnotationTags)
17 17
        {
18 18
            MemoryStream ms = new MemoryStream();
19
            var archive = new ZipArchive(ms, ZipArchiveMode.Create);
19
            var archive = new ZipArchive(ms, ZipArchiveMode.Create, true);
20 20

  
21 21
            for (int docIndex = 0; docIndex < documents.Count; docIndex++)
22 22
            {
......
48 48
                CreateFile(documentDir + "/final.json", finalAnnotationInfoJson, archive);
49 49
            }
50 50

  
51
            //archive.Dispose();
51
            archive.Dispose();
52 52
            ms.Position = 0;
53 53
            return ms;
54 54
        }

Také k dispozici: Unified diff