<p></p>
<blockquote>
<p dir="auto">but <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1060634652" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/3015" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/3015/hovercard" href="https://github.com/geany/geany/issues/3015">#3015</a> basically kills the possibility to move projects to other location without losing session files for that project so then this pull request becomes pointless.</p>
</blockquote>
<p dir="auto">It does not "kills the possibility to move projects to other location". I have noted <a href="https://github.com/geany/geany/issues/3015#issuecomment-979876697" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/3015/hovercard">several ways</a> that moving project files could be supported.</p>
<blockquote>
<p dir="auto">So I'm getting ready to be the evil guy who dislikes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1060634652" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/3015" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/3015/hovercard" href="https://github.com/geany/geany/issues/3015">#3015</a> :-)</p>
</blockquote>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1060634652" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/3015" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/3015/hovercard" href="https://github.com/geany/geany/issues/3015">#3015</a> is a discussion issue. If you dislike discussion, you don't have to participate. But you'd give up letting others know of your concerns and use cases.</p>
<blockquote>
<p dir="auto">To <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/xiota/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xiota">@xiota</a>... just more context why I want this to work:</p>
</blockquote>
<p dir="auto">As I've stated, I think this PR is reasonable and would support merging it with a few minor changes.</p>
<ul dir="auto">
<li>Add some comments to make clear to people staring at the code in the future what the intended behavior is.
<ul dir="auto">
<li>To note that <code>g_file_get_relative_path</code> does not create <code>..</code> paths.</li>
<li>To make clear that the purpose of lines 1290-1298 is to unpack relative paths for project files. (similar to the comment at 368-369)</li>
</ul>
<ul dir="auto">
<li>To note that non-project relative paths are not handled at this time (so people working on config/session split will know what to do when refactoring this code).</li>
</ul>
</li>
<li>Add a check to drop paths with <code>..</code> to prevent access to files outside the project folder.
<ul dir="auto">
<li>Even though this PR doesn't write relative paths in certain ways, session and project files can be edited externally or another PR may change it.</li>
</ul>
</li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3021#issuecomment-980477322">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5SEJBP67QMQ6EV4BDUOAS5FANCNFSM5IYZ3XZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJZQV4KZYRVGPACOGJTUOAS5FA5CNFSM5IYZ3XZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHJYOLCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3021#issuecomment-980477322",
"url": "https://github.com/geany/geany/pull/3021#issuecomment-980477322",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>