Skip to content

Commit

Permalink
Merge branch 'develop' into kdesktop-1378-cannot-create-subdir-in-sha…
Browse files Browse the repository at this point in the history
…red-unit-tests
  • Loading branch information
herve-er authored Nov 27, 2024
2 parents 28aae8d + 4e5311b commit c5f264b
Show file tree
Hide file tree
Showing 42 changed files with 428 additions and 80 deletions.
2 changes: 1 addition & 1 deletion infomaniak-build-tools/kDrive-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>New features</b></h2>
</ul>
<h2><b>Bug fixes</b></h2>
<ul>
<li>Resolution of a file synchronization problem affecting the Office suite in particular</li>
<li>Fixed new file wrongly downloaded in LiteSync mode</li>
<li>Fixed missing share links entries in contextual menu</li>
<li>Consolidation of error management during the propagation step</li>
<li>Do not block application startup if local sync folder is missing</li>
<li>Added "*.tmp" files to default exclusion templates</li>
<li>Fixed wrongly blacklisted files</li>
<li>Fixed broken sync on FAT systems</li>
<li>Fixed startup issue in case of unknown proxy type</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Neue Funktionen</b></h2>
</ul>
<h2><b>Fehlerbehebungen</b></h2>
<ul>
<li>Behebung eines Dateisynchronisationsproblems, das insbesondere die Office-Suite betrifft</li>
<li>Neue Datei wurde im LiteSync-Modus f&auml;lschlicherweise heruntergeladen</li>
<li>Fehlende Eintr&auml;ge f&uuml;r Freigabelinks im Kontextmen&uuml; behoben</li>
<li>Konsolidierung des Fehlermanagements w&auml;hrend der Ausbreitungsphase</li>
<li>Start der Anwendung nicht blockieren, wenn der lokale Synchronisierungsordner fehlt</li>
<li>*.tmp"-Dateien zu Standard-Ausschlussvorlagen hinzugef&uuml;gt</li>
<li>Falsch auf die schwarze Liste gesetzte Dateien korrigiert</li>
<li>Fehlerhafte Synchronisierung auf FAT-Systemen behoben</li>
<li>Startproblem im Falle eines unbekannten Proxy-Typs behoben</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>New features</b></h2>
</ul>
<h2><b>Bug fixes</b></h2>
<ul>
<li>Resolution of a file synchronization problem affecting the Office suite in particular</li>
<li>Fixed new file wrongly downloaded in LiteSync mode</li>
<li>Fixed missing share links entries in contextual menu</li>
<li>Consolidation of error management during the propagation step</li>
<li>Do not block application startup if local sync folder is missing</li>
<li>Added "*.tmp" files to default exclusion templates</li>
<li>Fixed wrongly blacklisted files</li>
<li>Fixed broken sync on FAT systems</li>
<li>Fixed startup issue in case of unknown proxy type</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Novedades</b></h2>
</ul>
<h2><b>Correcci&oacute;n de errores</b></h2>
<ul>
<li>Resoluci&oacute;n de un problema de sincronizaci&oacute;n de archivos que afectaba sobre todo al paquete Office.</li>
<li>Corregido el error de descarga de un nuevo archivo en el modo LiteSync</li>
<li>Se ha corregido la falta de entradas de enlaces compartidos en el men&uacute; contextual.</li>
<li>Consolidaci&oacute;n de la gesti&oacute;n de errores durante la etapa de propagaci&oacute;n</li>
<li>No bloquear el inicio de la aplicaci&oacute;n si falta la carpeta de sincronizaci&oacute;n local</li>
<li>A&ntilde;adidos los archivos "*.tmp" a las plantillas de exclusi&oacute;n por defecto</li>
<li>Correcci&oacute;n de archivos incluidos err&oacute;neamente en la lista negra</li>
<li>Corregida la sincronizaci&oacute;n rota en sistemas FAT</li>
<li>Se ha corregido un problema de inicio en caso de tipo de proxy desconocido.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Nouvelles fonctionnalit&eacute;s</b></h2>
</ul>
<h2><b>Correction de bugs</b></h2>
<ul>
<li>R&eacute;solution d'un probl&egrave;me de synchronisation de fichiers affectant notamment la suite Office</li>
<li>Correction d'un nouveau fichier mal t&eacute;l&eacute;charg&eacute; en mode LiteSync</li>
<li>Correction de l'absence de liens de partage dans le menu contextuel</li>
<li>Consolidation de la gestion des erreurs lors de l'&eacute;tape de propagation</li>
<li>Ne pas bloquer le d&eacute;marrage de l'application si le dossier de synchronisation local est manquant</li>
<li>Ajout des fichiers "*.tmp" aux mod&egrave;les d'exclusion par d&eacute;faut</li>
<li>Correction des fichiers mis sur liste noire &agrave; tort</li>
<li>Correction de la synchronisation interrompue sur les syst&egrave;mes FAT</li>
<li>Correction du probl&egrave;me de d&eacute;marrage en cas de type de proxy inconnu</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ <h2><b>Nuove caratteristiche</b></h2>
</ul>
<h2><b>Correzioni di bug</b></h2>
<ul>
<li>Risoluzione di un problema di sincronizzazione dei file che riguardava in particolare la suite Office.</li>
<li>Corretto il nuovo file scaricato erroneamente in modalit&agrave; LiteSync</li>
<li>Correzione delle voci mancanti dei link di condivisione nel menu contestuale</li>
<li>Consolidamento della gestione degli errori durante la fase di propagazione</li>
<li>Non bloccare l'avvio dell'applicazione se manca la cartella di sincronizzazione locale</li>
<li>Aggiunti i file "*.tmp" ai modelli di esclusione predefiniti</li>
<li>Corretti i file erroneamente inseriti nella lista nera</li>
<li>Corretta la sincronizzazione interrotta sui sistemi FAT</li>
<li>Corretto il problema di avvio in caso di tipo di proxy sconosciuto</li>
<li>Problemi di migrazione corretti</li>
<li>Corretto lo stato in caso di interruzione del caricamento</li>
<li>Escludere i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Escludete i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Corretto l'errore di parsing CSV che portava a un'istantanea remota incompleta.</li>
<li>Gestione migliorata degli errori di accesso negato</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Neue Funktionen</b></h2>
</ul>
<h2><b>Fehlerbehebungen</b></h2>
<ul>
<li>Behebung eines Dateisynchronisationsproblems, das insbesondere die Office-Suite betrifft</li>
<li>Neue Datei wurde im LiteSync-Modus f&auml;lschlicherweise heruntergeladen</li>
<li>Fehlende Eintr&auml;ge f&uuml;r Freigabelinks im Kontextmen&uuml; behoben</li>
<li>Konsolidierung des Fehlermanagements w&auml;hrend der Ausbreitungsphase</li>
<li>Start der Anwendung nicht blockieren, wenn der lokale Synchronisierungsordner fehlt</li>
<li>*.tmp"-Dateien zu Standard-Ausschlussvorlagen hinzugef&uuml;gt</li>
<li>Falsch auf die schwarze Liste gesetzte Dateien korrigiert</li>
<li>Fehlerhafte Synchronisierung auf FAT-Systemen behoben</li>
<li>Startproblem im Falle eines unbekannten Proxy-Typs behoben</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>New features</b></h2>
</ul>
<h2><b>Bug fixes</b></h2>
<ul>
<li>Resolution of a file synchronization problem affecting the Office suite in particular</li>
<li>Fixed new file wrongly downloaded in LiteSync mode</li>
<li>Fixed missing share links entries in contextual menu</li>
<li>Consolidation of error management during the propagation step</li>
<li>Do not block application startup if local sync folder is missing</li>
<li>Added "*.tmp" files to default exclusion templates</li>
<li>Fixed wrongly blacklisted files</li>
<li>Fixed broken sync on FAT systems</li>
<li>Fixed startup issue in case of unknown proxy type</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Novedades</b></h2>
</ul>
<h2><b>Correcci&oacute;n de errores</b></h2>
<ul>
<li>Resoluci&oacute;n de un problema de sincronizaci&oacute;n de archivos que afectaba sobre todo al paquete Office.</li>
<li>Corregido el error de descarga de un nuevo archivo en el modo LiteSync</li>
<li>Se ha corregido la falta de entradas de enlaces compartidos en el men&uacute; contextual.</li>
<li>Consolidaci&oacute;n de la gesti&oacute;n de errores durante la etapa de propagaci&oacute;n</li>
<li>No bloquear el inicio de la aplicaci&oacute;n si falta la carpeta de sincronizaci&oacute;n local</li>
<li>A&ntilde;adidos los archivos "*.tmp" a las plantillas de exclusi&oacute;n por defecto</li>
<li>Correcci&oacute;n de archivos incluidos err&oacute;neamente en la lista negra</li>
<li>Corregida la sincronizaci&oacute;n rota en sistemas FAT</li>
<li>Se ha corregido un problema de inicio en caso de tipo de proxy desconocido.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Nouvelles fonctionnalit&eacute;s</b></h2>
</ul>
<h2><b>Correction de bugs</b></h2>
<ul>
<li>R&eacute;solution d'un probl&egrave;me de synchronisation de fichiers affectant notamment la suite Office</li>
<li>Correction d'un nouveau fichier mal t&eacute;l&eacute;charg&eacute; en mode LiteSync</li>
<li>Correction de l'absence de liens de partage dans le menu contextuel</li>
<li>Consolidation de la gestion des erreurs lors de l'&eacute;tape de propagation</li>
<li>Ne pas bloquer le d&eacute;marrage de l'application si le dossier de synchronisation local est manquant</li>
<li>Ajout des fichiers "*.tmp" aux mod&egrave;les d'exclusion par d&eacute;faut</li>
<li>Correction des fichiers mis sur liste noire &agrave; tort</li>
<li>Correction de la synchronisation interrompue sur les syst&egrave;mes FAT</li>
<li>Correction du probl&egrave;me de d&eacute;marrage en cas de type de proxy inconnu</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ <h2><b>Nuove caratteristiche</b></h2>
</ul>
<h2><b>Correzioni di bug</b></h2>
<ul>
<li>Risoluzione di un problema di sincronizzazione dei file che riguardava in particolare la suite Office.</li>
<li>Corretto il nuovo file scaricato erroneamente in modalit&agrave; LiteSync</li>
<li>Correzione delle voci mancanti dei link di condivisione nel menu contestuale</li>
<li>Consolidamento della gestione degli errori durante la fase di propagazione</li>
<li>Non bloccare l'avvio dell'applicazione se manca la cartella di sincronizzazione locale</li>
<li>Aggiunti i file "*.tmp" ai modelli di esclusione predefiniti</li>
<li>Corretti i file erroneamente inseriti nella lista nera</li>
<li>Corretta la sincronizzazione interrotta sui sistemi FAT</li>
<li>Corretto il problema di avvio in caso di tipo di proxy sconosciuto</li>
<li>Problemi di migrazione corretti</li>
<li>Corretto lo stato in caso di interruzione del caricamento</li>
<li>Escludere i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Escludete i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Corretto l'errore di parsing CSV che portava a un'istantanea remota incompleta.</li>
<li>Gestione migliorata degli errori di accesso negato</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Neue Funktionen</b></h2>
</ul>
<h2><b>Fehlerbehebungen</b></h2>
<ul>
<li>Behebung eines Dateisynchronisationsproblems, das insbesondere die Office-Suite betrifft</li>
<li>Neue Datei wurde im LiteSync-Modus f&auml;lschlicherweise heruntergeladen</li>
<li>Fehlende Eintr&auml;ge f&uuml;r Freigabelinks im Kontextmen&uuml; behoben</li>
<li>Konsolidierung des Fehlermanagements w&auml;hrend der Ausbreitungsphase</li>
<li>Start der Anwendung nicht blockieren, wenn der lokale Synchronisierungsordner fehlt</li>
<li>*.tmp"-Dateien zu Standard-Ausschlussvorlagen hinzugef&uuml;gt</li>
<li>Falsch auf die schwarze Liste gesetzte Dateien korrigiert</li>
<li>Fehlerhafte Synchronisierung auf FAT-Systemen behoben</li>
<li>Startproblem im Falle eines unbekannten Proxy-Typs behoben</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>New features</b></h2>
</ul>
<h2><b>Bug fixes</b></h2>
<ul>
<li>Resolution of a file synchronization problem affecting the Office suite in particular</li>
<li>Fixed new file wrongly downloaded in LiteSync mode</li>
<li>Fixed missing share links entries in contextual menu</li>
<li>Consolidation of error management during the propagation step</li>
<li>Do not block application startup if local sync folder is missing</li>
<li>Added "*.tmp" files to default exclusion templates</li>
<li>Fixed wrongly blacklisted files</li>
<li>Fixed broken sync on FAT systems</li>
<li>Fixed startup issue in case of unknown proxy type</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Novedades</b></h2>
</ul>
<h2><b>Correcci&oacute;n de errores</b></h2>
<ul>
<li>Resoluci&oacute;n de un problema de sincronizaci&oacute;n de archivos que afectaba sobre todo al paquete Office.</li>
<li>Corregido el error de descarga de un nuevo archivo en el modo LiteSync</li>
<li>Se ha corregido la falta de entradas de enlaces compartidos en el men&uacute; contextual.</li>
<li>Consolidaci&oacute;n de la gesti&oacute;n de errores durante la etapa de propagaci&oacute;n</li>
<li>No bloquear el inicio de la aplicaci&oacute;n si falta la carpeta de sincronizaci&oacute;n local</li>
<li>A&ntilde;adidos los archivos "*.tmp" a las plantillas de exclusi&oacute;n por defecto</li>
<li>Correcci&oacute;n de archivos incluidos err&oacute;neamente en la lista negra</li>
<li>Corregida la sincronizaci&oacute;n rota en sistemas FAT</li>
<li>Se ha corregido un problema de inicio en caso de tipo de proxy desconocido.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2><b>Nouvelles fonctionnalit&eacute;s</b></h2>
</ul>
<h2><b>Correction de bugs</b></h2>
<ul>
<li>R&eacute;solution d'un probl&egrave;me de synchronisation de fichiers affectant notamment la suite Office</li>
<li>Correction d'un nouveau fichier mal t&eacute;l&eacute;charg&eacute; en mode LiteSync</li>
<li>Correction de l'absence de liens de partage dans le menu contextuel</li>
<li>Consolidation de la gestion des erreurs lors de l'&eacute;tape de propagation</li>
<li>Ne pas bloquer le d&eacute;marrage de l'application si le dossier de synchronisation local est manquant</li>
<li>Ajout des fichiers "*.tmp" aux mod&egrave;les d'exclusion par d&eacute;faut</li>
<li>Correction des fichiers mis sur liste noire &agrave; tort</li>
<li>Correction de la synchronisation interrompue sur les syst&egrave;mes FAT</li>
<li>Correction du probl&egrave;me de d&eacute;marrage en cas de type de proxy inconnu</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ <h2><b>Nuove caratteristiche</b></h2>
</ul>
<h2><b>Correzioni di bug</b></h2>
<ul>
<li>Risoluzione di un problema di sincronizzazione dei file che riguardava in particolare la suite Office.</li>
<li>Corretto il nuovo file scaricato erroneamente in modalit&agrave; LiteSync</li>
<li>Correzione delle voci mancanti dei link di condivisione nel menu contestuale</li>
<li>Consolidamento della gestione degli errori durante la fase di propagazione</li>
<li>Non bloccare l'avvio dell'applicazione se manca la cartella di sincronizzazione locale</li>
<li>Aggiunti i file "*.tmp" ai modelli di esclusione predefiniti</li>
<li>Corretti i file erroneamente inseriti nella lista nera</li>
<li>Corretta la sincronizzazione interrotta sui sistemi FAT</li>
<li>Corretto il problema di avvio in caso di tipo di proxy sconosciuto</li>
<li>Problemi di migrazione corretti</li>
<li>Corretto lo stato in caso di interruzione del caricamento</li>
<li>Escludere i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Escludete i file e le cartelle con nomi di lunghezza superiore a 255 caratteri.</li>
<li>Corretto il problema dei collegamenti simbolici e delle giunzioni</li>
<li>Corretto l'errore di parsing CSV che portava a un'istantanea remota incompleta.</li>
<li>Gestione migliorata degli errori di accesso negato</li>
Expand Down
4 changes: 4 additions & 0 deletions src/libcommon/utility/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ std::string toString(const ExitCause e) {
}
}

std::string toString(const ExitInfo e) {
return static_cast<std::string>(e);
}

std::string toString(const ConflictType e) {
switch (e) {
case ConflictType::None:
Expand Down
21 changes: 13 additions & 8 deletions src/libcommon/utility/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@ concept EnumClass = std::is_enum_v<C>;
template<class C> // Any enum class that can be converted to (and from) int
concept IntegralEnum = EnumClass<C> && std::is_convertible_v<std::underlying_type_t<C>, int>;

template<class C> // Any enum class that can be printed (with enumClassToString)
concept PrintableEnum = EnumClass<C> && requires(C e) { toString(e); };
template<class C> // Any types that can be converted to an int
concept ConvertibleToInt = requires(C e) { static_cast<int>(e); };

template<class C> // Any types that can be converted to string
concept LogableType = requires(C e) { toString(e); };

// Converters
template<IntegralEnum C>
template<ConvertibleToInt C>
inline constexpr int toInt(C e) {
return static_cast<int>(e);
}
Expand Down Expand Up @@ -246,6 +249,7 @@ struct ExitInfo {
const ExitCause &cause() const { return _cause; }
operator ExitCode() const { return _code; }
operator ExitCause() const { return _cause; }
explicit operator std::string() const { return "ExitInfo{" + toString(code()) + ", " + toString(cause()) + "}"; }
constexpr operator bool() const { return _code == ExitCode::Ok; }
constexpr explicit operator int() const { return toInt(_code) * 100 + toInt(_cause); }
constexpr bool operator==(const ExitInfo &other) const { return _code == other._code && _cause == other._cause; }
Expand All @@ -254,6 +258,7 @@ struct ExitInfo {
ExitCode _code{ExitCode::Unknown};
ExitCause _cause{ExitCause::Unknown};
};
std::string toString(ExitInfo e);

// Conflict types ordered by priority
enum class ConflictType {
Expand Down Expand Up @@ -589,27 +594,27 @@ std::wstring stringToWideString(const std::string &str); // Convert string to ws
// Stream Operator (toString)
static const std::string noConversionStr("No conversion to string available");

template<PrintableEnum C>
template<LogableType C>
std::string toStringWithCode(C e) {
return toString(e) + "(" + std::to_string(toInt(e)) + ")"; // Example: "Ok(1)"
}

template<PrintableEnum C>
template<LogableType C>
inline std::wostream &operator<<(std::wostream &wos, C e) {
return wos << typesUtility::stringToWideString(toStringWithCode(e));
}

template<PrintableEnum C>
template<LogableType C>
inline std::ostream &operator<<(std::ostream &os, C e) {
return os << toStringWithCode(e);
}

template<PrintableEnum C>
template<LogableType C>
inline CustomLogWStream &operator<<(CustomLogWStream &os, C e) {
return os << typesUtility::stringToWideString(toStringWithCode(e));
}

template<PrintableEnum C>
template<LogableType C>
inline QDebug &operator<<(QDebug &os, C e) {
return os << toStringWithCode(e).c_str();
}
Expand Down
Loading

0 comments on commit c5f264b

Please sign in to comment.