Bug 476104 - Some resource path wrong if you have some resources from outside the project folder
Summary: Some resource path wrong if you have some resources from outside the project ...
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: git-master
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-26 07:21 UTC by red_Arti
Modified: 2023-10-26 07:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
project files (48.07 KB, application/zip)
2023-10-26 07:21 UTC, red_Arti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description red_Arti 2023-10-26 07:21:31 UTC
Created attachment 162572 [details]
project files

SUMMARY

If you have added some resources outside of your project folder to your video project, and you "save as" your project, some resource path will be wrong

STEPS TO REPRODUCE
1. Prepare these folders and files
    ```
    /pathto/bug-demo/common/picture.jpg
    /pathto/bug-demo/common/voice.mp3
    /pathto/bug-demo/project_1/
    /pathto/bug-demo/project_2/
    ```

2. In Kdenlive,
    1. Menu File-> New. 
    2. Set option "Project folder": Parent folder of the project file 
    3. Click OK

3. Drag and drop `picture.jpg` and `voice.mp3` to add to kdenlive tracks (from file manager window Dolphin `/pathto/bug-demo/common/`)

4. Create and add color clip:
    1. Menu Project->Add Color Clip->OK.
    2. Drag and drop the color clip from list to track.

5. Kdenlive menu File->Save,  save to `/pathto/bug-demo/project_1/vp1.kdenlive`. Popup "Warning: ... will move temporary files ...". Click "Continue"

    Now if you open `vp1.kdenlive` in text editor you see
    ```xml
    <producer id="producer2" in="00:00:00.000" out="00:00:04.960">
    <property name="resource">0xff8080ff</property>
    <property name="kdenlive:clipname">Color Clip</property>
    </producer>
    ```
    which is ok. 

6. Kdenlive menu File->Save As,  save another copy to `/pathto/bug-demo/project_2/vp2.kdenlive` .  Popup "Warning: ... will move temporary files ...". Click "Continue"

    Now we have files
    ```
    /pathto/bug-demo/common/picture.jpg
    /pathto/bug-demo/common/voice.mp3
    /pathto/bug-demo/project_1/vp1.kdenlive
    /pathto/bug-demo/project_2/vp2.kdenlive
    ```


    Now if you open `vp2.kdenlive` in text editor you see
    ```xml
    <producer id="producer2" in="00:00:00.000" out="00:00:04.960">
    <property name="resource">/pathto/bug-demo/project_1/0xff8080ff</property>
    <property name="kdenlive:clipname">Color Clip</property>
    </producer>
    ```
    the resource path is wrong. It should use relative path `0xff8080ff`. Even the absolute path should be `../project_2/0xff8080ff` not `project_1`.


OBSERVED RESULT
    The color clip uses absolute path and the path is wrong

EXPECTED RESULT
    The color clip should use relative path


SOFTWARE/OS VERSIONS
Kdenlive 23.08.2 (in flatpak on Linux x64 X11 KDE)