Open Bug 861271 Opened 11 years ago Updated 2 years ago

[mozfile] Add support for very long paths and add tests

Categories

(Testing :: Mozbase, defect, P5)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: k0scist, Unassigned)

Details

bug 860426 adds additional functionality to deal with long paths on
windows:

http://hg.mozilla.org/build/tools/file/1c40178a3527/clobberer/clobberer.py#l42

This functionality should be ported to mozfile and a test written to
ensure that it is not hit.
Sir ,
   Can we use the stat module and check for the readability
 # Make sure directory is writable
     SetFileAttributesW('\\\\?\\' + dir, FILE_ATTRIBUTE_NORMAL)
can we use this instead 
     fileAtt = os.stat(dir)[0]
     if (not fileAtt & stat.S_IWRITE):
         os.chmod(myFile, stat.S_IWRITE)

Thanks.
(In reply to bitsjamadagni from comment #1)
> Sir ,
>    Can we use the stat module and check for the readability
>  # Make sure directory is writable
>      SetFileAttributesW('\\\\?\\' + dir, FILE_ATTRIBUTE_NORMAL)
> can we use this instead 
>      fileAtt = os.stat(dir)[0]
>      if (not fileAtt & stat.S_IWRITE):
>          os.chmod(dir, stat.S_IWRITE)
> 
> Thanks.
I don't know if i can answer that question correctly.  The short answer is "we should do the right thing that works". if os.stat is that, then sure
>         os.chmod(dir, stat.S_IWRITE)

This should be 'os.chmod(dir, fileAtt | stat.S_IWRITE)' otherwise the other permissions would be overwritten.
Mass closing bugs with no activity in 2+ years. If this bug is important to you, please re-open.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
We might want to check if we can handle those paths.
Status: RESOLVED → REOPENED
Priority: -- → P5
Resolution: WONTFIX → ---
Summary: port bug 860426 to mozfile and add test → [mozfile] Add support for very long paths and add tests
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.