[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    D24489: KAutosaveFile not respecting maximum filename length
From:       Ahmad Samir <noreply () phabricator ! kde ! org>
Date:       2019-12-03 19:05:47
Message-ID: ab259429b7e43443017c301102c36065 () localhost ! localdomain
[Download RAW message or body]

[Attachment #2 (text/plain)]

ahmadsamir added a comment.


  I was wrong, indeed NAME_MAX is what should be used; looking at the code in \
KAutoSaveFile::open(), and how tempFileName() is actually used:  
    tempFile = staleFilesDir + QChar::fromLatin1('/') + d->tempFileName();
  
  NAME_MAX is what should be used, as tempFileName() returns the "filename" part \
only, not the whole path.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24489

To: mardelle, #frameworks, dfaure
Cc: ahmadsamir, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


[Attachment #3 (text/html)]

<table><tr><td style="">ahmadsamir added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D24489">View Revision</a></tr></table><br \
/><div><div><p>I was wrong, indeed NAME_MAX is what should be used; looking at the \
code in KAutoSaveFile::open(), and how tempFileName() is actually used:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">tempFile = staleFilesDir + \
QChar::fromLatin1(&#039;/&#039;) + d-&gt;tempFileName();</pre></div>

<p>NAME_MAX is what should be used, as tempFileName() returns the \
&quot;filename&quot; part only, not the whole path.</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D24489">https://phabricator.kde.org/D24489</a></div></div><br \
/><div><strong>To: </strong>mardelle, Frameworks, dfaure<br /><strong>Cc: \
</strong>ahmadsamir, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, \
bruns<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic