Integration unsuccessful when desktop file is symlinked
tdiam opened this issue · comments
Theodore Diamantidis commented
The AppimageToolsRepository.integrate
method expects the desktop file to be a regular file when moving it into $HOME/.local/share/applications/
.
However, some images (e.g. KeePassXC) use a symlinked desktop file that points to usr/share/applications/
(allowed in the spec).
This causes the following when the user clicks on "Integrate":
- A symlink is copied to
$HOME/.local/share/applications
which however is dangling since it points to ausr/share/applications
path that does not exist in that directory. - The app is therefore never actually integrated.
- If the user clicks on "Disintegrate", the action fails with an error of:
that is caused by this line that expects the desktop file to have proper contents.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (length): Invalid value: Only valid value is 0: 1 #0 AppimageToolsRepository.remove (package:appimagepool/src/features/home/data/appimage_tools_repository.dart:163) <asynchronous suspension> #1 AppimageToolsRepository.integrateOrRemove (package:appimagepool/src/features/home/data/appimage_tools_repository.dart:195) <asynchronous suspension> #2 InstalledViewController.integrateOrRemove (package:appimagepool/src/features/home/presentation/installed/installed_view_controller.dart:26) <asynchronous suspension> #3 InstalledViewState.integrateOrRemove (package:appimagepool/src/features/home/presentation/installed/installed_view_state.dart:40) <asynchronous suspension>